Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can CFF fonts have reduced numberOfHMetrics? #1186

Open
bjh21 opened this issue Nov 23, 2024 · 0 comments
Open

Can CFF fonts have reduced numberOfHMetrics? #1186

bjh21 opened this issue Nov 23, 2024 · 0 comments

Comments

@bjh21
Copy link

bjh21 commented Nov 23, 2024

Description

Under the "Recommendations" for the 'hmtx' table, there's this sentence:

OpenType fonts that include CFF data must set numberOfHMetrics equal to the number of glyphs in the font and therefore cannot use the “repeat last width” optimization normally available within the 'hmtx' table.

But the specifications for the 'hmtx' and 'hhea' tables don't mention this restriction and implies that numberOfHMetrics works the same in CFF and TrueType flavoured fonts. Similarly, the recommendation for 'hhea' just above says:

It is suggested that monospaced fonts set numberOfHMetrics to three (see 'hmtx').

without any suggestion that this applies only to TrueType-flavoured fonts.

Either the recommendation should be removed, or there should be a statement in the specification of the 'hhea' table that fonts with CFF outlines can't reduce numberOfHMetrics. In the latter case, the situation with CFF2 fonts should also be made clear.

Both FontForge and TTX generate CFF-flavoured OpenType fonts with reduced numberOfHMetrics, which leads me to suspect that the correct resolution is to remove the recommendation.

Page URL

https://learn.microsoft.com/en-us/typography/opentype/spec/recom

Content source URL

https://github.com/MicrosoftDocs/typography/blob/live/typographydocs/opentype/spec/recom.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant