{"action":"created","issue":{"url":"https://api.github.com/repos/googlei18n/fontmake/issues/11","repository_url":"https://api.github.com/repos/googlei18n/fontmake","labels_url":"https://api.github.com/repos/googlei18n/fontmake/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/googlei18n/fontmake/issues/11/comments","events_url":"https://api.github.com/repos/googlei18n/fontmake/issues/11/events","html_url":"https://github.com/googlei18n/fontmake/issues/11","id":132920848,"number":11,"title":"fontmake passes incomplete feature files to fonttools","user":{"login":"brawer","id":1527880,"avatar_url":"https://avatars.githubusercontent.com/u/1527880?v=3","gravatar_id":"","url":"https://api.github.com/users/brawer","html_url":"https://github.com/brawer","followers_url":"https://api.github.com/users/brawer/followers","following_url":"https://api.github.com/users/brawer/following{/other_user}","gists_url":"https://api.github.com/users/brawer/gists{/gist_id}","starred_url":"https://api.github.com/users/brawer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brawer/subscriptions","organizations_url":"https://api.github.com/users/brawer/orgs","repos_url":"https://api.github.com/users/brawer/repos","events_url":"https://api.github.com/users/brawer/events{/privacy}","received_events_url":"https://api.github.com/users/brawer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-02-11T08:59:30Z","updated_at":"2016-02-11T09:54:45Z","closed_at":null,"body":"When building [Raleway-Medium.ufo](https://github.com/FlossFoundry/Raleway/tree/master/src/Raleway-Medium.ufo), fontmake crashes with the following error:\r\n```\r\n$ fontmake -u src/Raleway-Medium.ufo\r\n>> Removing overlaps for Raleway Medium\r\n>> Saving OTF for Raleway Medium\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/fontmake\", line 9, in <module>\r\n    load_entry_point('fontmake', 'console_scripts', 'fontmake')()\r\n  File \"/home/sascha/src/fontmake/Lib/fontmake/__main__.py\", line 47, in main\r\n    project.run_from_ufos(ufo_paths, **args)\r\n  File \"/home/sascha/src/fontmake/Lib/fontmake/font_project.py\", line 174, in run_from_ufos\r\n    mti_feafiles=mti_paths.get(name), kern_writer=GlyphsKernWriter)\r\n  File \"/home/sascha/src/fontmake/Lib/fontmake/font_project.py\", line 118, in save_otf\r\n    kernWriter=kern_writer, mtiFeaFiles=mti_feafiles)\r\n  File \"/usr/local/lib/python2.7/dist-packages/ufo2ft/__init__.py\", line 29, in compileOTF\r\n    featureCompilerClass, mtiFeaFiles, kernWriter, markWriter)\r\n  File \"/usr/local/lib/python2.7/dist-packages/ufo2ft/__init__.py\", line 18, in _compile\r\n    featureCompiler.compile()\r\n  File \"/usr/local/lib/python2.7/dist-packages/ufo2ft/makeotfParts.py\", line 38, in compile\r\n    self.setupFile_featureTables()\r\n  File \"/usr/local/lib/python2.7/dist-packages/ufo2ft/makeotfParts.py\", line 183, in setupFile_featureTables\r\n    addOpenTypeFeatures(fea_path, self.outline)\r\n  File \"/usr/local/lib/python2.7/dist-packages/FontTools/fontTools/feaLib/builder.py\", line 13, in addOpenTypeFeatures\r\n    builder.build()\r\n  File \"/usr/local/lib/python2.7/dist-packages/FontTools/fontTools/feaLib/builder.py\", line 50, in build\r\n    self.parseTree = Parser(self.featurefile_path).parse()\r\n  File \"/usr/local/lib/python2.7/dist-packages/FontTools/fontTools/feaLib/parser.py\", line 40, in parse\r\n    statements.append(self.parse_feature_block_())\r\n  File \"/usr/local/lib/python2.7/dist-packages/FontTools/fontTools/feaLib/parser.py\", line 820, in parse_feature_block_\r\n    self.parse_block_(block, vertical)\r\n  File \"/usr/local/lib/python2.7/dist-packages/FontTools/fontTools/feaLib/parser.py\", line 872, in parse_block_\r\n    statements.append(self.parse_substitute_())\r\n  File \"/usr/local/lib/python2.7/dist-packages/FontTools/fontTools/feaLib/parser.py\", line 543, in parse_substitute_\r\n    self.parse_glyph_pattern_(vertical=False)\r\n  File \"/usr/local/lib/python2.7/dist-packages/FontTools/fontTools/feaLib/parser.py\", line 246, in parse_glyph_pattern_\r\n    gc = self.parse_glyphclass_(accept_glyphname=True)\r\n  File \"/usr/local/lib/python2.7/dist-packages/FontTools/fontTools/feaLib/parser.py\", line 181, in parse_glyphclass_\r\n    self.cur_token_location_)\r\nfontTools.feaLib.error.FeatureLibError: /tmp/tmpOwId86:13:9: Unknown glyph class @smcp1\r\n```\r\n\r\nHowever, [the file in /tmp/tmpOwId86](https://github.com/googlei18n/fontmake/files/126080/tmpOwId86.txt) has no definition of glyph class smcp1. fontTools.feaLib is therefore correct when it rejects this input. When passing that same file to AFDKO, it equally rejects it with the same error message.\r\n\r\nNow, the command `fontmake -u src/Raleway-Medium.ufo --use-afdko` does _not_ fail in feature file parsing but barfs on https://github.com/googlei18n/fontmake/issues/10. This is extremely surprising, because the content of the tmpOwId86 feature file would also have been rejected by AFDKO. Does AFDKO receive a different input feature file than feaLib? Or does fontmake not check for makeotf errors? (Actually, when running fontmake under strace, I could not find any exec calls to makeotf; perhaps makeotf does not get run at all, despite passing --use-afdko?)"},"comment":{"url":"https://api.github.com/repos/googlei18n/fontmake/issues/comments/182786847","html_url":"https://github.com/googlei18n/fontmake/issues/11#issuecomment-182786847","issue_url":"https://api.github.com/repos/googlei18n/fontmake/issues/11","id":182786847,"user":{"login":"adrientetar","id":1250894,"avatar_url":"https://avatars.githubusercontent.com/u/1250894?v=3","gravatar_id":"","url":"https://api.github.com/users/adrientetar","html_url":"https://github.com/adrientetar","followers_url":"https://api.github.com/users/adrientetar/followers","following_url":"https://api.github.com/users/adrientetar/following{/other_user}","gists_url":"https://api.github.com/users/adrientetar/gists{/gist_id}","starred_url":"https://api.github.com/users/adrientetar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrientetar/subscriptions","organizations_url":"https://api.github.com/users/adrientetar/orgs","repos_url":"https://api.github.com/users/adrientetar/repos","events_url":"https://api.github.com/users/adrientetar/events{/privacy}","received_events_url":"https://api.github.com/users/adrientetar/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T09:54:45Z","updated_at":"2016-02-11T09:54:45Z","body":"> So the bug is in FontLab 5?\r\n\r\nI don't really know FL5, but there was a script called UFOcentral to make UFOs and then Fontlab published vfb2ufo which is another tool to convert to UFO (you might want to try regenerating from this one since it's more recent and I think it may generate better output)."}}