{"action":"created","issue":{"url":"https://api.github.com/repos/fonttools/fonttools/issues/684","repository_url":"https://api.github.com/repos/fonttools/fonttools","labels_url":"https://api.github.com/repos/fonttools/fonttools/issues/684/labels{/name}","comments_url":"https://api.github.com/repos/fonttools/fonttools/issues/684/comments","events_url":"https://api.github.com/repos/fonttools/fonttools/issues/684/events","html_url":"https://github.com/fonttools/fonttools/issues/684","id":180472459,"number":684,"title":"Problem with OpenType bitmap font (Ambrosia.otb)","user":{"login":"lemzwerg","id":1630245,"avatar_url":"https://avatars.githubusercontent.com/u/1630245?v=3","gravatar_id":"","url":"https://api.github.com/users/lemzwerg","html_url":"https://github.com/lemzwerg","followers_url":"https://api.github.com/users/lemzwerg/followers","following_url":"https://api.github.com/users/lemzwerg/following{/other_user}","gists_url":"https://api.github.com/users/lemzwerg/gists{/gist_id}","starred_url":"https://api.github.com/users/lemzwerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemzwerg/subscriptions","organizations_url":"https://api.github.com/users/lemzwerg/orgs","repos_url":"https://api.github.com/users/lemzwerg/repos","events_url":"https://api.github.com/users/lemzwerg/events{/privacy}","received_events_url":"https://api.github.com/users/lemzwerg/received_events","type":"User","site_admin":false},"labels":[{"id":49202271,"url":"https://api.github.com/repos/fonttools/fonttools/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-01T18:39:32Z","updated_at":"2016-11-01T01:13:20Z","closed_at":null,"body":"[This zipped SFNT bitmap-only font](https://github.com/fonttools/fonttools/files/504565/Ambrosia.zip), created a long time ago by George Williams with FontForge, can't be correctly disassembled with current git (1eba7b3).\nI get (with paths shortened for readability)\n\n```\nDumping \"Ambrosia.otb\" to \"Ambrosia.ttx\"...\nDumping 'GlyphOrder' table...\nDumping 'head' table...\nDumping 'hhea' table...\nDumping 'maxp' table...\nDumping 'OS/2' table...\nDumping 'hmtx' table...\nDumping 'cmap' table...\nWARNING: corrupt 'loca' table, or wrong numGlyphs in 'maxp': 0 250\nDumping 'loca' table...\nERROR: An exception occurred during the decompilation of the 'glyf' table\nTraceback (most recent call last):\n  File \".../fontTools/ttLib/__init__.py\", line 418, in __getitem__\n    table.decompile(data, self)\n  File \".../fontTools/ttLib/tables/_g_l_y_f.py\", line 62, in decompile\n    if len(data) - next >= 4:\nUnboundLocalError: local variable 'next' referenced before assignment\nDumping 'glyf' table...\nDumping 'name' table...\nDumping 'post' table...\nDumping 'EBDT' table...\nDumping 'EBLC' table...\nDumping 'EBSC' table...\nDumping 'GDEF' table...\nDumping 'GPOS' table...\nDumping 'GSUB' table...\n```\n\nThe `glyf` table is empty, and ttx doesn't like this while assembling.\n\n```\nParsing 'GlyphOrder' table...\nParsing 'head' table...\nParsing 'hhea' table...\nParsing 'maxp' table...\nParsing 'OS/2' table...\nParsing 'hmtx' table...\nParsing 'cmap' table...\nParsing 'loca' table...\nParsing 'glyf' table...\nParsing 'name' table...\nParsing 'post' table...\nParsing 'EBDT' table...\nParsing 'EBLC' table...\nParsing 'EBSC' table...\nParsing 'GDEF' table...\nParsing 'GPOS' table...\nParsing 'GSUB' table...\nERROR: Unhandled exception has occurred\nTraceback (most recent call last):\n  File \".../fontTools/ttx.py\", line 381, in main\n    process(jobs, options)\n  File \".../fontTools/ttx.py\", line 355, in process\n    action(input, output, options)\n  File \".../fontTools/misc/loggingTools.py\", line 372, in wrapper\n    return func(*args, **kwds)\n  File \".../fontTools/ttx.py\", line 276, in ttCompile\n    ttf.save(output)\n  File \".../fontTools/ttLib/__init__.py\", line 216, in save\n    self._writeTable(tag, writer, done)\n  File \".../fontTools/ttLib/__init__.py\", line 649, in _writeTable\n    self._writeTable(masterTable, writer, done)\n  File \".../fontTools/ttLib/__init__.py\", line 652, in _writeTable\n    tabledata = self.getTableData(tag)\n  File \".../fontTools/ttLib/__init__.py\", line 663, in getTableData\n    return self.tables[tag].compile(self)\n  File \".../fontTools/ttLib/tables/_m_a_x_p.py\", line 45, in compile\n    self.recalc(ttFont)\n  File \".../fontTools/ttLib/tables/_m_a_x_p.py\", line 64, in recalc\n    self.numGlyphs = len(glyfTable)\nTypeError: object of type 'DefaultTable' has no len()\n```\n\nI don't know whether such a font without any data in the `glyf` table is supported except by FreeType, however, ttx should either support it or cleanly reject it.\n"},"comment":{"url":"https://api.github.com/repos/fonttools/fonttools/issues/comments/257466456","html_url":"https://github.com/fonttools/fonttools/issues/684#issuecomment-257466456","issue_url":"https://api.github.com/repos/fonttools/fonttools/issues/684","id":257466456,"user":{"login":"behdad","id":142891,"avatar_url":"https://avatars.githubusercontent.com/u/142891?v=3","gravatar_id":"","url":"https://api.github.com/users/behdad","html_url":"https://github.com/behdad","followers_url":"https://api.github.com/users/behdad/followers","following_url":"https://api.github.com/users/behdad/following{/other_user}","gists_url":"https://api.github.com/users/behdad/gists{/gist_id}","starred_url":"https://api.github.com/users/behdad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behdad/subscriptions","organizations_url":"https://api.github.com/users/behdad/orgs","repos_url":"https://api.github.com/users/behdad/repos","events_url":"https://api.github.com/users/behdad/events{/privacy}","received_events_url":"https://api.github.com/users/behdad/received_events","type":"User","site_admin":false},"created_at":"2016-11-01T01:13:20Z","updated_at":"2016-11-01T01:13:20Z","body":"> you mean, we should allow to decompile empty glyf tables (such as in OTB files), but then when we compile them back we should automatically add a .notdef glyph? I think the user should fix the latter.\r\n\r\nRight now fonttools is not in the business of enforcing anything on this level.  I think it should stay that way."}}
{"actor":{"display_login":"behdad"}}