bugThe FreeType Project - Bugs: bug #54565, Upside down transform and...


You are not allowed to post comments on this tracker with your current authentication level.

bug #54565: Upside down transform and FT_GlyphSlot_Oblique made opposite angle

Submitter:  Toshio Nakamura <tnakamura>
Submitted:  Fri 24 Aug 2018 06:19:11 AM UTC
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Invalid Privacy:  Public
Assigned to:  podtelez Open/Closed:  Closed
Planned Release:  None

( Jump to the original submission )

Mon 19 Aug 2019 02:56:05 PM UTC, comment #8: 

Matrix operations don’t commute. It will never be obvious. So yes, to satisfy specific needs, specific matrix needs to be calculated.

Alexei Podtelezhnikov <podtelez>
Project Member
Mon 19 Aug 2019 01:44:31 PM UTC, comment #7: 

What if one wants to render an italicized glyph which is rotated 90 degrees? Loading glyph via 'FT_Load_Glyph' using rotation matrix, and then calling 'FT_GlyphSlot_Oblique' won't work because the latter will add a slant along the wrong axis.
It would be more convenient if 'FT_GlyphSlot_Oblique' would take the load-time matrix into account. Right now, the only way to achieve the desired result seems to be the calculation of the required matrix in the client code (combining the rotation and italicizing matrices).

Dmitry Batrak <dbatrak>
Sat 06 Apr 2019 05:14:11 AM UTC, comment #6: 

I'm closing this now as invalid.  Please feel free to add more information in case it becomes available.

Werner LEMBERG <wl>
Project Administrator
Wed 05 Sep 2018 01:49:05 AM UTC, comment #5: 

Hi Werner,
I opened JDK-8210058, but no update yet.

Toshio Nakamura <tnakamura>
Tue 04 Sep 2018 07:06:54 PM UTC, comment #4: 

Toshio-san, any comments from the OpenJDK people?

Werner LEMBERG <wl>
Project Administrator
Mon 27 Aug 2018 01:48:52 AM UTC, comment #3: 

Thank you for the quick replys. I'll report this issue to OpenJDK community.

Toshio Nakamura <tnakamura>
Fri 24 Aug 2018 01:21:36 PM UTC, comment #2: 

I also think that everything is fine. Both transformations applied correctly: first reflection then slant. In the mirror world both slanting angle and text direction would appear opposite. Are you sure you want mirror reflection and not rotation by 180 degrees? In the rotated world you would indeed preserve slanting angle and text direction.

Alexei Podtelezhnikov <podtelez>
Project Member
Fri 24 Aug 2018 06:57:33 AM UTC, comment #1: 

Thanks for the report and the code example.

I think what you see is correct behaviour, according to the documentation.  `FT_Set_Transform' only sets the transformation for `FT_Load_Glyph', i.e., creating the data for an `FT_GlyphSlot' object.  However, `FT_GlyphSlot_Oblique' acts on an `FT_GlyphSlot' object; it is thus not controlled by the transformation set up with `FT_Set_Transform'.

Alexei, I'm assigning this issue to you.  Do you think it would be beneficial to change `FT_GlyphSlot_Oblique' to obey `face->internal->transformation_matrix'?  Contrary to `FT_Glyph' objects, `FT_GlyphSLot' has still a connection to its parent face...

Werner LEMBERG <wl>
Project Administrator
Fri 24 Aug 2018 06:19:11 AM UTC, original submission:  

When we transformed upside down by FT_Set_Transform() and to set italic style by FT_GlyphSlot_Oblique(), The angle of italic shape is opposite.
It seems transforming upside down is ignored.

This problem occurred with OpenJDK and some conditions (creating PS data with AlphaComposite or Texture)
OpenJDK creates printing image upside down, and characters with italic attribute calls FT_GlyphSlot_Oblique(), then hit this problem.

Attached C++ sample code and the output SVG file.

Toshio Nakamura <tnakamura>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #44845:  invItalic.cpp added by tnakamura (3KiB - application/octet-stream)
file #44846:  Out.svg added by tnakamura (609B - image/svg+xml)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dbatrak (Posted a comment)
  • -email is unavailable- added by podtelez (Posted a comment)
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by tnakamura
  • -email is unavailable- added by tnakamura (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-06 wl StatusNone Invalid
        Open/ClosedOpen Closed
    2018-08-24 wl Assigned toNone podtelez
    2018-08-24 tnakamura Attached File- Added invItalic.cpp, #44845
        Attached File- Added Out.svg, #44846
        Carbon-Copy- Added tnakamura

    Back to the top

    Powered by Savane 3.9