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

[makeotfexe] Using .notdef glyph in a class causes error #726

Closed
khaledhosny opened this issue Feb 6, 2019 · 1 comment
Closed

[makeotfexe] Using .notdef glyph in a class causes error #726

khaledhosny opened this issue Feb 6, 2019 · 1 comment

Comments

@khaledhosny
Copy link
Collaborator

Given a feature file containing:

table GDEF {
  GlyphClassDef [.notdef], , , ;
} GDEF;

Processing it with makeotf causes:

makeotf [Warning] Could not find FontMenuNameDB file. Font will be built with menu names derived from PostScript name.
makeotfexe [WARNING] FontMenuNameDB file was not specified or not found. [Foo]
makeotfexe [FATAL] <Foo> aborting because of errors
makeotf [Error] Failed to build output font file 'Foo.otf'.

(ignoring the irrelevant warnings), there is no explanation for the cause of error and I had to debug the C code to find the root cause:

if (secondPart != NULL) {
*secondPart = '\0';
secondPart++;
gid = featMapGName2GID(g, firstPart, FALSE);
endgid = featMapGName2GID(g, secondPart, FALSE);
if (gid != 0 && endgid != 0) {
gcAddRange(gid, endgid, firstPart, secondPart);
} else {
hotMsg(g, hotFATAL, "aborting because of errors");
}

Further more I think using .notdef here is valid and several other tools allow generating GDEF tables with .notdef assigned a glyph class.

@readroberts
Copy link
Contributor

@mousa @cjchapman
I agree that .notdef should be allowed to be part of glyph classes. The change needs to be from testing against gid== 0 to gid == GID_UNDEF in line 178. However, featgram.c is a file derived from running the ANTLR parse against featgram.g; edits should be made in afdko/c/makeotf/makeotf_lib/build/hotpccts/featgram.g.

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

No branches or pull requests

2 participants