{"action":"created","issue":{"url":"https://api.github.com/repos/fonttools/fonttools/issues/1194","repository_url":"https://api.github.com/repos/fonttools/fonttools","labels_url":"https://api.github.com/repos/fonttools/fonttools/issues/1194/labels{/name}","comments_url":"https://api.github.com/repos/fonttools/fonttools/issues/1194/comments","events_url":"https://api.github.com/repos/fonttools/fonttools/issues/1194/events","html_url":"https://github.com/fonttools/fonttools/issues/1194","id":299733712,"number":1194,"title":"[varLib] Problem in varLib when fonts do not have GPOS?","user":{"login":"Lorp","id":587440,"avatar_url":"https://avatars3.githubusercontent.com/u/587440?v=4","gravatar_id":"","url":"https://api.github.com/users/Lorp","html_url":"https://github.com/Lorp","followers_url":"https://api.github.com/users/Lorp/followers","following_url":"https://api.github.com/users/Lorp/following{/other_user}","gists_url":"https://api.github.com/users/Lorp/gists{/gist_id}","starred_url":"https://api.github.com/users/Lorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lorp/subscriptions","organizations_url":"https://api.github.com/users/Lorp/orgs","repos_url":"https://api.github.com/users/Lorp/repos","events_url":"https://api.github.com/users/Lorp/events{/privacy}","received_events_url":"https://api.github.com/users/Lorp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-23T14:43:51Z","updated_at":"2018-02-23T15:15:27Z","closed_at":null,"author_association":"NONE","body":"I think there‘s a problem in varLib with fonts that do not have a GPOS table, with varLib trying to merge non-existent tables.\r\n\r\nfontmake crashes when trying to build a variable TTF from MutatorSans UFOs + designspace:\r\n\r\n    $ fontmake -o variable -m MutatorSans.designspace\r\n    INFO:fontmake.font_project:Building interpolation-compatible TTFs\r\n    INFO:fontmake.font_project:Converting curves compatibly\r\n    ...\r\n    Traceback (most recent call last):\r\n      File \"/Users/lorp/Library/Python/2.7/bin/fontmake\", line 9, in <module>\r\n        load_entry_point('fontmake==1.4.0', 'console_scripts', 'fontmake')()\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontmake/__main__.py\", line 191, in main\r\n        project.run_from_designspace(designspace_path, **args)\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontmake/font_project.py\", line 437, in run_from_designspace\r\n        interpolate_layout_from=interpolate_layout_from, **kwargs)\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontmake/font_project.py\", line 496, in run_from_ufos\r\n        self.build_variable_font(designspace_path)\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontmake/font_project.py\", line 220, in build_variable_font\r\n        font, _, _ = varLib.build(designspace_path, finder)\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontTools/varLib/__init__.py\", line 756, in build\r\n        _merge_OTL(vf, model, master_fonts, axisTags)\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontTools/varLib/__init__.py\", line 534, in _merge_OTL\r\n        merger.mergeTables(font, master_fonts, ['GPOS'])\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontTools/varLib/merger.py\", line 107, in mergeTables\r\n        self.mergeThings(font[tag], [m[tag] for m in master_ttfs])\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontTools/ttLib/ttFont.py\", line 372, in __getitem__\r\n        data = self.reader[tag]\r\n      File \"/Users/lorp/Library/Python/2.7/lib/python/site-packages/fontTools/ttLib/sfnt.py\", line 104, in __getitem__\r\n        entry = self.tables[Tag(tag)]\r\n    KeyError: 'GPOS'\r\n\r\nA couple of days ago I edited `__init__.py` line 534 to make (`merger.mergeTables(font, master_fonts, ['GPOS'])`) conditional (`if 'GPOS' in font:`) and that allowed me to make var TTFs from MutatorSans. However that no longer works. Any ideas?"},"comment":{"url":"https://api.github.com/repos/fonttools/fonttools/issues/comments/368037031","html_url":"https://github.com/fonttools/fonttools/issues/1194#issuecomment-368037031","issue_url":"https://api.github.com/repos/fonttools/fonttools/issues/1194","id":368037031,"user":{"login":"anthrotype","id":6939968,"avatar_url":"https://avatars3.githubusercontent.com/u/6939968?v=4","gravatar_id":"","url":"https://api.github.com/users/anthrotype","html_url":"https://github.com/anthrotype","followers_url":"https://api.github.com/users/anthrotype/followers","following_url":"https://api.github.com/users/anthrotype/following{/other_user}","gists_url":"https://api.github.com/users/anthrotype/gists{/gist_id}","starred_url":"https://api.github.com/users/anthrotype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthrotype/subscriptions","organizations_url":"https://api.github.com/users/anthrotype/orgs","repos_url":"https://api.github.com/users/anthrotype/repos","events_url":"https://api.github.com/users/anthrotype/events{/privacy}","received_events_url":"https://api.github.com/users/anthrotype/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T15:15:27Z","updated_at":"2018-02-23T15:15:27Z","author_association":"OWNER","body":"it looks like you need to exclude both `-x GPOS -x GDEF`, as `_merge_OTL` does the two of them"}}
{"actor":{"display_login":"anthrotype"}}