Treat empty guideline names as no name - #414
Merged
Merged
Conversation
The UFO spec marks a guideline's name as optional, and some real-world fonts write it as an explicit empty string (e.g. five UFOs in Google's Roboto Serif sources). Name validation rejected these, failing the whole fontinfo.plist (or .glif) load. Treat an empty name as an absent one when reading, matching fontTools; writing is unchanged and cannot produce an empty name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tomconroy
force-pushed
the
empty-guideline-names
branch
from
July 13, 2026 09:09
a0e65b7 to
8a8e63f
Compare
RickyDaMa
reviewed
Jul 13, 2026
RickyDaMa
left a comment
Collaborator
There was a problem hiding this comment.
This seems like a sensible workaround to me, although the current implementation is spec-compliant:
name: An arbitrary name for the guideline. This attribute is optional. It must be at least one character long.
^ https://unifiedfontobject.org/versions/ufo3/glyphs/glif/#guideline
Which basically says that if the field is going to be specified it should be non-empty.
No strong opinion from me either way.
cmyr
approved these changes
Jul 13, 2026
cmyr
left a comment
Member
There was a problem hiding this comment.
Thanks! given that the name field is explicitly optional I'm happy to skip empty strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Norad failed to parse a real-world UFO that has a guideline with an empty name. This patch allows empty guideline names.
See: https://github.com/googlefonts/roboto-serif/blob/8346c2b0ecec6bf539be222ea84de5906ef1ade8/sources/Roboto_Serif_Micro_Cond-Super.ufo/fontinfo.plist#L22-L23