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

don't reorder 'space', but simply warn when building COLRv0 if gid1 is not blank #886

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

anthrotype
Copy link
Member

After reverting googlefonts/glyphsLib#1038, I also decided to revert #881 (at least the latter wasn't released yet).

It was a detail of DirectWrite COLRv0 implementation in Windows 10 that required that glyph at index 1 should be blank, but that's no longer the case for later Windows versions, and in fact the COLR OT spec also removed that.
MicrosoftDocs/typography-issues#346

There's no guarantee that a glyph named "space" is blank, and the reverted code was only checking glyph names.
There is no reason to put a glyph named "space" in second position in fonts that don't even contain COLRv0.
And one may well build a COLRv0 font that is not intended to work on older Windows and as such doesn't require the gid1 to be blank.

All in all, I think that it's sufficient to just issue a Windows-specific warning when the built font contains any COLRv0 color glyphs and the glyph at index 1 is not blank.

The font developer can then decide what is best, whether to ignore the warning or whether to add or select an empty glyph to be placed at index 1 by setting the appropriate public.glyphOrder key in the lib.plist.

@anthrotype
Copy link
Member Author

and thank you @khaledhosny and sorry for the time wasted

@anthrotype anthrotype merged commit 06baacc into main Nov 8, 2024
9 checks passed
@anthrotype anthrotype deleted the empty-gid1-only-for-colrv0 branch November 8, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant