freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Incorrect vertBearingY for CFF fonts


From: Eric Muller
Subject: Incorrect vertBearingY for CFF fonts
Date: Wed, 2 Sep 2020 10:47:04 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

In cff/cffgload.c, at the end, in the function cff_slot_load: The bearings are set early on from calls to a get_metrics() font method. Those values are in font design units. Then towards the end of the cff_slot_load, there is a call to FT_Outline_Get_CBox, that retrieves the glyph bbox in scaled units. That sets horiBearing{X,Y} and vertBearingX but vertBearingY is left alone, and is not scaled. In the "if (has_vertical_info)" that sets metrics->vertBearingX, there should be a scaling of vertBearingY, e.g. "metrics->vertBearingY = FT_MulFix (metrics->vertBearingY, glyph->y_scale);"


Eric.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]