[fontforge-users] xheight bug?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[fontforge-users] xheight bug?

Michael Sharpe
While working with an italic font, Baskervaldx-Ita.otf, in the Baskervald package posted at

https://dl.dropboxusercontent.com/u/3825336/TeX/index.html

the xheight specified in the TeX section is 440, but when FF generates a pfb/afm, it gives an xheight of 570. Looking at the source code (SFStandardHeight() in splinefont.c) with an inexpert eye, it seems that FF examines the characteristics of a number of lowercase glyphs in order to estimate the xheight. To me it seems that if there are no flat areas on the tops of these glyphs, the italic case works better. In my example font, one italic glyph, p, has a flat top and the result is the height, 570, of the ascender on the p. If I modify the right top corner of its ascender, raising it by one em from 570 to 571, and then generate a pfb/afm again, the xheight drops to 467, still not great but much better. I take that as an indication that the code which looks to check if there is exactly one flat top height is the source of the non-monotonic behavior.

This used the Mac version of the new 20141126 release, but the result is the same with other recent versions.

Michael
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Reply | Threaded
Open this post in threaded view
|

Re: xheight bug?

Dave Crossland
Hi

I started an issue on the Github issue tracker :)

https://github.com/fontforge/fontforge/issues/1959

On 27 November 2014 at 23:56, Michael Sharpe <[hidden email]> wrote:
While working with an italic font, Baskervaldx-Ita.otf, in the Baskervald package posted at

https://dl.dropboxusercontent.com/u/3825336/TeX/index.html

the xheight specified in the TeX section is 440, but when FF generates a pfb/afm, it gives an xheight of 570. Looking at the source code (SFStandardHeight() in splinefont.c) with an inexpert eye, it seems that FF examines the characteristics of a number of lowercase glyphs in order to estimate the xheight. To me it seems that if there are no flat areas on the tops of these glyphs, the italic case works better. In my example font, one italic glyph, p, has a flat top and the result is the height, 570, of the ascender on the p. If I modify the right top corner of its ascender, raising it by one em from 570 to 571, and then generate a pfb/afm again, the xheight drops to 467, still not great but much better. I take that as an indication that the code which looks to check if there is exactly one flat top height is the source of the non-monotonic behavior.

This used the Mac version of the new 20141126 release, but the result is the same with other recent versions.

Michael
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html



--
Cheers
Dave

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html