[HarfBuzz] HarfBuzz glyph offsets

Jonathan Blow jon at number-none.com
Wed Dec 23 20:40:52 PST 2015


(Although also it looks from here like I should be using
BitmapGlyphRec.left and BitmapGlyphRec.top, which I used to use until
yesterday when I decided to use the bearings for consistency in using 26_6
numbers everywhere, and that seemed fine since these values are usually
equal, but maybe they are not always equal and that was a dumb mistake and
I should switch back to left,top explicitly.)

On Wed, Dec 23, 2015 at 8:35 PM, Jonathan Blow <jon at number-none.com> 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.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151223/709ad453/attachment.html>


More information about the HarfBuzz mailing list