{"action":"created","issue":{"url":"https://api.github.com/repos/googlei18n/glyphsLib/issues/284","repository_url":"https://api.github.com/repos/googlei18n/glyphsLib","labels_url":"https://api.github.com/repos/googlei18n/glyphsLib/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/googlei18n/glyphsLib/issues/284/comments","events_url":"https://api.github.com/repos/googlei18n/glyphsLib/issues/284/events","html_url":"https://github.com/googlei18n/glyphsLib/pull/284","id":273895654,"number":284,"title":"Set hhea caretSlopeRise and caretSlopeRun based on italicAngle value","user":{"login":"punchcutter","id":11257204,"avatar_url":"https://avatars1.githubusercontent.com/u/11257204?v=4","gravatar_id":"","url":"https://api.github.com/users/punchcutter","html_url":"https://github.com/punchcutter","followers_url":"https://api.github.com/users/punchcutter/followers","following_url":"https://api.github.com/users/punchcutter/following{/other_user}","gists_url":"https://api.github.com/users/punchcutter/gists{/gist_id}","starred_url":"https://api.github.com/users/punchcutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punchcutter/subscriptions","organizations_url":"https://api.github.com/users/punchcutter/orgs","repos_url":"https://api.github.com/users/punchcutter/repos","events_url":"https://api.github.com/users/punchcutter/events{/privacy}","received_events_url":"https://api.github.com/users/punchcutter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-14T18:28:11Z","updated_at":"2017-11-14T20:26:30Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/googlei18n/glyphsLib/pulls/284","html_url":"https://github.com/googlei18n/glyphsLib/pull/284","diff_url":"https://github.com/googlei18n/glyphsLib/pull/284.diff","patch_url":"https://github.com/googlei18n/glyphsLib/pull/284.patch"},"body":"It appears that Glyphs (or makeotf?) calculates `caretSlopeRise` and `caretSlopeRun` from the italicAngle, but glyphsLib doesn't do this anywhere. ufo2ft checks for `openTypeHheaCaretSlopeRise` and `openTypeHheaCaretSlopeRun` so all we need to do for the default is to add these to the ufo. \r\nI tested on a few files and this gives me the same hhea values that are generated when exported from Glyphs. \r\n@schriftgestalt does this look correct to you? \r\n"},"comment":{"url":"https://api.github.com/repos/googlei18n/glyphsLib/issues/comments/344387181","html_url":"https://github.com/googlei18n/glyphsLib/pull/284#issuecomment-344387181","issue_url":"https://api.github.com/repos/googlei18n/glyphsLib/issues/284","id":344387181,"user":{"login":"punchcutter","id":11257204,"avatar_url":"https://avatars1.githubusercontent.com/u/11257204?v=4","gravatar_id":"","url":"https://api.github.com/users/punchcutter","html_url":"https://github.com/punchcutter","followers_url":"https://api.github.com/users/punchcutter/followers","following_url":"https://api.github.com/users/punchcutter/following{/other_user}","gists_url":"https://api.github.com/users/punchcutter/gists{/gist_id}","starred_url":"https://api.github.com/users/punchcutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punchcutter/subscriptions","organizations_url":"https://api.github.com/users/punchcutter/orgs","repos_url":"https://api.github.com/users/punchcutter/repos","events_url":"https://api.github.com/users/punchcutter/events{/privacy}","received_events_url":"https://api.github.com/users/punchcutter/received_events","type":"User","site_admin":false},"created_at":"2017-11-14T20:26:30Z","updated_at":"2017-11-14T20:26:30Z","author_association":"NONE","body":"@schriftgestalt Ok, that's what it looked like. Here's the makeotf code from makeotf hhea.c which is basically the same thing. \r\n```\r\n    if (g->font.ItalicAngle == 0) {\r\n        h->tbl.caretSlopeRise       = 1;\r\n        h->tbl.caretSlopeRun        = 0;\r\n    }\r\n    else {\r\n        h->tbl.caretSlopeRise       = 1000;\r\n        h->tbl.caretSlopeRun        =\r\n            (short)RND(tan(FIX2DBL(-g->font.ItalicAngle) / RAD_DEG) * 1000);\r\n\r\n```"}}
{"actor":{"display_login":"punchcutter"}}