freetype
[Top][All Lists]
Advanced

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

Re: [ft] How to compute the baseline for for a font face?


From: Lawrence D'Oliveiro
Subject: Re: [ft] How to compute the baseline for for a font face?
Date: Wed, 19 Apr 2017 14:10:29 +1200

On Tue, 18 Apr 2017 17:22:19 -0500, R0b0t1 wrote:

> I am aware of face->bbox and face->height but can't figure out the
> computation to figure out how far I should raise all characters so
> that the bottom of the lowest character (maybe a "g") will be just
> above the horizontal axis.

You want the FT_Face descender value
<https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_FaceRec>.

But be aware that this value, like the rest of the font metrics, is set
by the font designer to make the text lines look good overall, it won’t
necessarily guarantee that the text won’t get clipped.



reply via email to

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