chiark / gitweb /
Add a "Unique font identifier" string (name ID 3)
authorBen Harris <bjh21@bjh21.me.uk>
Thu, 27 Feb 2025 09:49:38 +0000 (09:49 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Thu, 27 Feb 2025 09:49:38 +0000 (09:49 +0000)
This seems to be necessary for the font viewer in MS Windows 11 to
consider the font to be valid.  The semantics of this field are not
documented in the OpenType spec, but the Apple TrueType spec does at
least give an example.  I've roughly followed Apple's example, putting
together the full name, version number, and build date that we already
have to hand and include in the font.  Between them those should
uniquely identify reasonable builds of Bedstead fonts without adding
extra complexity or non-reproducibility.

bedstead.c

index 9bdc44de273f04307b4b6b5302de2efd4dc58d82..218523ac7b10ac8465dddc2daec10510ccfe0c77 100644 (file)
@@ -3590,6 +3590,7 @@ main(int argc, char **argv)
                      weight->suffix[0] ? width->suffix :
                      width->suffix[0] ? width->suffix+1 : "");
        }
+       NAMEF(3, "%s; %s; %s", get_fullname(), VERSION, timestr);
        NAME(4, get_fullname());
        NAME(5, "Version " VERSION);
        NAME(6, fullname_to_fontname(get_fullname()));