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

Warn if glyph name too long #235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simoncozens
Copy link

According to the post table spec,

Names must be no longer than 63 characters; some older implementations may assume a length limit of 31 characters.

This implements a check for name length of glyph names in the post table. As glyph names are purely informational, I have made this a warning rather than an error.

@ctrlcctrlv
Copy link

Thanks Simon! Yeah, this will break poorly implemented software, like FontForge. (Cf. fontforge/fontforge#4751.) I imagine other similarly badly-thought-out C code is just doing char[63] somewhere.

@khaledhosny
Copy link
Owner

We either should truncate the names (tricky as it can result in duplicate names) or drop the names entirely and change the table version to 3 (should be safe on the web), if we really think this is potentially an issue. Warnings are good, but OTS main job is a sanitizer not a linting tool.

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.

3 participants