{"action":"created","issue":{"url":"https://api.github.com/repos/LLK/scratch-svg-renderer/issues/29","repository_url":"https://api.github.com/repos/LLK/scratch-svg-renderer","labels_url":"https://api.github.com/repos/LLK/scratch-svg-renderer/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/LLK/scratch-svg-renderer/issues/29/comments","events_url":"https://api.github.com/repos/LLK/scratch-svg-renderer/issues/29/events","html_url":"https://github.com/LLK/scratch-svg-renderer/pull/29","id":327783412,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNDkzMzgx","number":29,"title":"Font calibration","user":{"login":"fsih","id":2855464,"node_id":"MDQ6VXNlcjI4NTU0NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2855464?v=4","gravatar_id":"","url":"https://api.github.com/users/fsih","html_url":"https://github.com/fsih","followers_url":"https://api.github.com/users/fsih/followers","following_url":"https://api.github.com/users/fsih/following{/other_user}","gists_url":"https://api.github.com/users/fsih/gists{/gist_id}","starred_url":"https://api.github.com/users/fsih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsih/subscriptions","organizations_url":"https://api.github.com/users/fsih/orgs","repos_url":"https://api.github.com/users/fsih/repos","events_url":"https://api.github.com/users/fsih/events{/privacy}","received_events_url":"https://api.github.com/users/fsih/received_events","type":"User","site_admin":false},"labels":[{"id":927898685,"node_id":"MDU6TGFiZWw5Mjc4OTg2ODU=","url":"https://api.github.com/repos/LLK/scratch-svg-renderer/labels/pr%20-%20good%20to%20merge","name":"pr - good to merge","color":"0e8a66","default":false}],"state":"open","locked":false,"assignee":{"login":"fsih","id":2855464,"node_id":"MDQ6VXNlcjI4NTU0NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2855464?v=4","gravatar_id":"","url":"https://api.github.com/users/fsih","html_url":"https://github.com/fsih","followers_url":"https://api.github.com/users/fsih/followers","following_url":"https://api.github.com/users/fsih/following{/other_user}","gists_url":"https://api.github.com/users/fsih/gists{/gist_id}","starred_url":"https://api.github.com/users/fsih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsih/subscriptions","organizations_url":"https://api.github.com/users/fsih/orgs","repos_url":"https://api.github.com/users/fsih/repos","events_url":"https://api.github.com/users/fsih/events{/privacy}","received_events_url":"https://api.github.com/users/fsih/received_events","type":"User","site_admin":false},"assignees":[{"login":"fsih","id":2855464,"node_id":"MDQ6VXNlcjI4NTU0NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2855464?v=4","gravatar_id":"","url":"https://api.github.com/users/fsih","html_url":"https://github.com/fsih","followers_url":"https://api.github.com/users/fsih/followers","following_url":"https://api.github.com/users/fsih/following{/other_user}","gists_url":"https://api.github.com/users/fsih/gists{/gist_id}","starred_url":"https://api.github.com/users/fsih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsih/subscriptions","organizations_url":"https://api.github.com/users/fsih/orgs","repos_url":"https://api.github.com/users/fsih/repos","events_url":"https://api.github.com/users/fsih/events{/privacy}","received_events_url":"https://api.github.com/users/fsih/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/LLK/scratch-svg-renderer/milestones/7","html_url":"https://github.com/LLK/scratch-svg-renderer/milestone/7","labels_url":"https://api.github.com/repos/LLK/scratch-svg-renderer/milestones/7/labels","id":3333614,"node_id":"MDk6TWlsZXN0b25lMzMzMzYxNA==","number":7,"title":"May 2018","description":null,"creator":{"login":"fsih","id":2855464,"node_id":"MDQ6VXNlcjI4NTU0NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2855464?v=4","gravatar_id":"","url":"https://api.github.com/users/fsih","html_url":"https://github.com/fsih","followers_url":"https://api.github.com/users/fsih/followers","following_url":"https://api.github.com/users/fsih/following{/other_user}","gists_url":"https://api.github.com/users/fsih/gists{/gist_id}","starred_url":"https://api.github.com/users/fsih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsih/subscriptions","organizations_url":"https://api.github.com/users/fsih/orgs","repos_url":"https://api.github.com/users/fsih/repos","events_url":"https://api.github.com/users/fsih/events{/privacy}","received_events_url":"https://api.github.com/users/fsih/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":5,"state":"open","created_at":"2018-05-09T15:54:16Z","updated_at":"2018-05-30T17:55:44Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-05-30T15:28:13Z","updated_at":"2018-05-31T20:51:37Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/LLK/scratch-svg-renderer/pulls/29","html_url":"https://github.com/LLK/scratch-svg-renderer/pull/29","diff_url":"https://github.com/LLK/scratch-svg-renderer/pull/29.diff","patch_url":"https://github.com/LLK/scratch-svg-renderer/pull/29.patch"},"body":"### Resolves\r\nFixes https://github.com/LLK/scratch-paint/issues/479\r\nFixes https://github.com/LLK/scratch-paint/issues/442\r\n2.0 renders text as if it has more padding around all edges, and this also significantly affects the line height\r\n\r\n### Proposed Changes\r\n- Simulate the padding around each line of text by changing the line spacing and translating the first line to the correct location in the scratch 2 conversion code\r\n\r\nI wasn't able to figure out how to derive the offsets (I suspect part of it is that alignment-baseline=text-before-edge is not doing anything). They seem highly dependent on the font--for instance, Gloria shifts up while Scratch shifts down and to the left. Therefore I ended up hard-coding these offsets on a per-font basis.\r\n\r\nBefore: (Project 226299289 in Scratch 2 and 3 overlaid)\r\n<img width=\"483\" alt=\"font calibration before\" src=\"https://user-images.githubusercontent.com/2855464/40729840-4d47df9c-63fb-11e8-9d39-dfb69ed878bb.png\">\r\nAfter:\r\n<img width=\"483\" alt=\"font calibration\" src=\"https://user-images.githubusercontent.com/2855464/40729847-507bd5ba-63fb-11e8-829c-d31e16022b7e.png\">\r\n\r\nBefore: (Project 226304687 in Scratch 2 and 3)\r\n![image](https://user-images.githubusercontent.com/2855464/40730035-bc2b7c48-63fb-11e8-9b34-45614d7e3c93.png)\r\nAfter:\r\n![image](https://user-images.githubusercontent.com/2855464/40730095-e460a0d0-63fb-11e8-98d9-fe4d4f213f86.png)\r\n\r\n### Reason for Changes\r\n\r\nCompatibility\r\n\r\n### Test Coverage\r\nTested projects 226299289, 226304687, 226490686, 219155892, 209781807"},"comment":{"url":"https://api.github.com/repos/LLK/scratch-svg-renderer/issues/comments/393675747","html_url":"https://github.com/LLK/scratch-svg-renderer/pull/29#issuecomment-393675747","issue_url":"https://api.github.com/repos/LLK/scratch-svg-renderer/issues/29","id":393675747,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzY3NTc0Nw==","user":{"login":"fsih","id":2855464,"node_id":"MDQ6VXNlcjI4NTU0NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2855464?v=4","gravatar_id":"","url":"https://api.github.com/users/fsih","html_url":"https://github.com/fsih","followers_url":"https://api.github.com/users/fsih/followers","following_url":"https://api.github.com/users/fsih/following{/other_user}","gists_url":"https://api.github.com/users/fsih/gists{/gist_id}","starred_url":"https://api.github.com/users/fsih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsih/subscriptions","organizations_url":"https://api.github.com/users/fsih/orgs","repos_url":"https://api.github.com/users/fsih/repos","events_url":"https://api.github.com/users/fsih/events{/privacy}","received_events_url":"https://api.github.com/users/fsih/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T20:51:37Z","updated_at":"2018-05-31T20:51:37Z","author_association":"MEMBER","body":"That's a good idea, I will put this in for now to make sure it gets in but follow up"}}
{"actor":{"display_login":"fsih"}}