RedHatOfficial / Overpass

Overpass open source web font family — Sponsored by Red Hat
http://overpassfont.org
SIL Open Font License 1.1
2k stars 92 forks source link

vertical metrics on v3.001 #37

Closed m4rc1e closed 7 years ago

m4rc1e commented 7 years ago

Hey folks,

Sorry to disturb again. Ok, you've solved the clipping but the line spacing is now too loose. Since it's a Friday, I'll take a stab at this myself I think. Give me a few hours.

screen shot 2016-12-02 at 13 48 46 screen shot 2016-12-02 at 13 48 18

There is a flag in the OS/2 table called, 'Use_Typo_Metrics'. Enabling this flag will make Window's applications use the OS/2 typo asc and typo desc values, instead of the Win Asc and Win Desc. Using this flag is crucial in solving this problem. By not enabling this flag and changing the win asc and desc to the bbox, we get this problem.

This error is especially troublesome on the Monospace fonts because Sublime, Notepad, vim etc all don't have control over line-height/leading.

Cheers, Marc

m4rc1e commented 7 years ago

I've compared the metrics against the old fonts and figured out values which should retain the old leading and not lead to clipping.

We currently have this situation:

Left: Old Right: New screen shot 2016-12-02 at 14 55 59

old value totals: win total = 1266 typo total = 1266 hhea total = 1532

new value totals: win total = 1440 typototal = 1266 hheatotal = 1706

Proposed value totals: win total = 1440 typo total = 1266 hhea total = 1532 Enable use typo metrics flag in OS/2 table

Basically, my proposed typo and hhea values are the same as the old. We adopt the new win asc and desc. To negate the consequences of the larger spacing caused by the new win values, we enable 'use typo metrics'. By doing this, we get the following

Left: Proposed, MIddle: Old, Right:New screen shot 2016-12-02 at 14 54 07

Here's the proposed vertical metric values

typoAscender: 750
typoDescender: -250
typoLineGap: 266

hheaAscender: 982
hheaDescender: -284
hheaLineGap: 266

winAscent: 1062
winDescent: 378

To enable Use Typo Metrics in glyphsapp: screen shot 2016-12-02 at 15 06 25

Apologies I can't do this myself. I hope this helps you. Also use impallari/testing. The site caches fonts with the same name so to compare old and new fonts, you need to open the site again in a new tab/window.

Kind regards and have a nice weekend, Marc

DelveFonts commented 7 years ago

Thanks for bringing this to our attention and for the recommends @m4rc1e. We thought the issue was resolved but will give it another shot right away.

DelveFonts commented 7 years ago

Fixed. After reviewing the options, we are going with your recommendation @m4rc1e to see how that shakes out.