> 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

_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to