{"action":"created","issue":{"url":"https://api.github.com/repos/cburgmer/rasterizeHTML.js/issues/166","repository_url":"https://api.github.com/repos/cburgmer/rasterizeHTML.js","labels_url":"https://api.github.com/repos/cburgmer/rasterizeHTML.js/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/cburgmer/rasterizeHTML.js/issues/166/comments","events_url":"https://api.github.com/repos/cburgmer/rasterizeHTML.js/issues/166/events","html_url":"https://github.com/cburgmer/rasterizeHTML.js/issues/166","id":191090072,"number":166,"title":"Image rendered before all required webfonts are loaded","user":{"login":"jammus","id":381842,"avatar_url":"https://avatars.githubusercontent.com/u/381842?v=3","gravatar_id":"","url":"https://api.github.com/users/jammus","html_url":"https://github.com/jammus","followers_url":"https://api.github.com/users/jammus/followers","following_url":"https://api.github.com/users/jammus/following{/other_user}","gists_url":"https://api.github.com/users/jammus/gists{/gist_id}","starred_url":"https://api.github.com/users/jammus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jammus/subscriptions","organizations_url":"https://api.github.com/users/jammus/orgs","repos_url":"https://api.github.com/users/jammus/repos","events_url":"https://api.github.com/users/jammus/events{/privacy}","received_events_url":"https://api.github.com/users/jammus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-22T18:40:06Z","updated_at":"2016-12-06T01:27:27Z","closed_at":null,"body":"We're seeing problems when multiple versions/character sets of a webfont are required. In this case the text with the superscript and the Japanese text are not rendered, likely because the font has not been loaded in time.\r\n\r\nIs it possible to detect when all fonts have been loaded?\r\n\r\n**Test case**\r\nOpen https://jsfiddle.net/urmeo3du/8/\r\n\r\n**Expected**\r\nSee \"HEADER 67ᵗʰ 浜崎あゆみ TEXT\" repeated (once as HTML, once rendered on canvas)\r\n\r\n**Result**\r\n\"HEADER TEXT\" is displayed\r\n\r\n**Note**\r\nYou may have to disable cache (eg, keeping the console open) when running the test. Also, subsequent runs of the test may render correctly.\r\n\r\n(otherwise, this library is working great; thanks for making it available)"},"comment":{"url":"https://api.github.com/repos/cburgmer/rasterizeHTML.js/issues/comments/265033271","html_url":"https://github.com/cburgmer/rasterizeHTML.js/issues/166#issuecomment-265033271","issue_url":"https://api.github.com/repos/cburgmer/rasterizeHTML.js/issues/166","id":265033271,"user":{"login":"cburgmer","id":101613,"avatar_url":"https://avatars.githubusercontent.com/u/101613?v=3","gravatar_id":"","url":"https://api.github.com/users/cburgmer","html_url":"https://github.com/cburgmer","followers_url":"https://api.github.com/users/cburgmer/followers","following_url":"https://api.github.com/users/cburgmer/following{/other_user}","gists_url":"https://api.github.com/users/cburgmer/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgmer/subscriptions","organizations_url":"https://api.github.com/users/cburgmer/orgs","repos_url":"https://api.github.com/users/cburgmer/repos","events_url":"https://api.github.com/users/cburgmer/events{/privacy}","received_events_url":"https://api.github.com/users/cburgmer/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T01:27:27Z","updated_at":"2016-12-06T01:27:27Z","body":"This is interesting. Either you are taping into specific browser behaviour\nor I haven't fully understood the problem.\n\nIf you look at the intermediate SVG that this library generates (get it via\n'.then' handler) then both your approaches should give you the exact same\nsource. Any URL will be fetched and inlined as dataURI. So your second\napproach is just shortcutting this.\n\nThe only way I can explain this is that the browser will have already seen\nthe dataURI in approach #2 hence immediately have a handle on the rendering.\n"}}
{"actor":{"display_login":"cburgmer"}}