[HarfBuzz] HarfBuzz glyph offsets

Nikolay Sivov bunglehead at gmail.com
Wed Dec 23 20:46:49 PST 2015


On 24.12.2015 7:35, Jonathan Blow wrote:
>>
>>
>> Offsets are adjustments accumulated during shaping, bearings are design
>> glyph metrics. Instead of using metrics you should be using actual glyph
>> box, CBox or BBox in freetype terms.
> 
> 
> ​I don't think either of these sentences is correct. The CBox contains
> non-visual elements such as non-interpolated spline control points, so if
> you use that, you end up wasting space. Referring once again to
> http://www.freetype.org/freetype2/docs/tutorial/step2.html it says that the
> bearing is the distance from the cursor position to the edge of the actual
> image's bounding box. Note that this tutorial mentions calling Get_Bbox and
> explicitly says you probably don't want to do it.
>
It says that because it's slower that Get_CBox. Section 'c' of this
tutorial talks about getting image size. Also take a look at
ft_outline_draw() from freetype2-demos.



More information about the HarfBuzz mailing list