freetype
[Top][All Lists]
Advanced

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

Re: [ft] face->ascender always has the same height


From: Olumide
Subject: Re: [ft] face->ascender always has the same height
Date: Tue, 29 Nov 2016 17:06:53 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0

On 29/11/2016 12:31, Nikolay Sivov wrote:
On 28.11.2016 16:09, Olumide wrote:
I've written a bit of code to rasterizing fonts at any arbitrary size as
follows:
 ...
Oddly, face->ascender always has the same height. Why is this the case?

Because it's not scaled. It's a font global design metric that for SFNT
fonts unfortunately exists in 3 different places: hhea table, and two
times in OS/2 table of appropriate version. Freetype tries to return
reasonable value from all three of those.

I need the ascender in order to locate my rasterized font in the
requested box (of max size FONT_HEIGHT).

Note that rendered bitmap does not necessary fit into a box of
FONT_HEIGHT height. Ascender/descender fields are used for layout
estimation and scaling on Windows.

Thanks for chiming in.

All that said, is there some way to situate the 640 by 768 bitmap created by FreeType in the 1152 by 1152 'grid' that I requested?

- Olumide




reply via email to

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