freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [GSoC] Extending the CF2 interpreter


From: Werner LEMBERG
Subject: Re: [ft-devel] [GSoC] Extending the CF2 interpreter
Date: Mon, 17 Jul 2017 15:49:07 +0200 (CEST)

> So I tried converting SourceSansPro-Regular using fontforge.  [...]
>
> Looking at the metrics, though...
>
> [AFM]
>   Ascender 712
>   Descender -205
>
> Original (OS/2)
>     <sTypoAscender value="750"/>
>     <sTypoDescender value="-250"/>
>
> The relevant fields in the AFM are, I believe, `Ascender' and
> `Descender'.  However, these do not match `sTypoAscender' and
> `sTypoDescender', which is what `cffgload.c' uses to set the
> vertical advance, and I can't find a way to combine the other values
> to make these.  I'm not sure why fontforge output those values...

Looks like a buglet (or feature) in FontForge.  It seems that the
ascender and descender values are based on the font's bboxes of all
glyphs (taking probably the maximum and minimum, respectively).
However, the OS/2 values should be taken literally instead.

Unfortunately, handling global ascender and descender correctly is
hard for TTFs, cf.

  https://glyphsapp.com/tutorials/vertical-metrics

Maybe this can be configured in FontForge during export?  Otherwise
you could submit a report (or feature request) to FontForge's github
page.


    Werner



reply via email to

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