Hi Khaled, You are right. The 80% ascent I was getting from fontforge was hardcoded in their parsettf.c::readttfhead(). No wonder I was getting the same relative value for all my fonts.
The strange thing is that Google Slides seems to be using the same proportion for their "text box" margins. Which ultimately made me raise my eyebrows to freetype2. All is well. I will continue my pursuit for vertical alignment but there is no point in bother the freetype2 devs any further. Many thanks, Dalai -- blendernetwork.org/dalai-felinto www.dalaifelinto.com Em ter, 28 de ago de 2018 às 20:10, Khaled Hosny <[email protected]> escreveu: > On Tue, Aug 28, 2018 at 07:11:26PM -0300, Dalai Felinto wrote: > > Hi, > > > > I'm trying to get the ascent and descent of a font with freetype2. The > > sample code is really small and can be found here [1]. > > > > However the values I get are very different from what FontForge and even > > google slides is using. > > > > For example, the Indie Flower font [2] has 819 and 205 (0.8, 0.2) > according > > to FontForge. However, in freetype2 I'm getting 994 and (-)500 (0.67 and > > 0.33). > > > > The same is valid for numerous other fonts that I tried (which curiously > > all had 0.8 and 0.2 proportional values). > > In FontForge you should look under Font Info → OS/2 → Metrics, the > values you see under Font Info → General are not actually used for > anything in the exported font AFAIK. > > Regards, > Khaled > _______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
