{"action":"created","issue":{"url":"https://api.github.com/repos/sebmarkbage/art/issues/6","labels_url":"https://api.github.com/repos/sebmarkbage/art/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/sebmarkbage/art/issues/6/comments","events_url":"https://api.github.com/repos/sebmarkbage/art/issues/6/events","html_url":"https://github.com/sebmarkbage/art/pull/6","id":94440665,"number":6,"title":"Add fallback for missing font option in canvas/text","user":{"login":"johannhof","id":2622601,"avatar_url":"https://avatars.githubusercontent.com/u/2622601?v=3","gravatar_id":"","url":"https://api.github.com/users/johannhof","html_url":"https://github.com/johannhof","followers_url":"https://api.github.com/users/johannhof/followers","following_url":"https://api.github.com/users/johannhof/following{/other_user}","gists_url":"https://api.github.com/users/johannhof/gists{/gist_id}","starred_url":"https://api.github.com/users/johannhof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johannhof/subscriptions","organizations_url":"https://api.github.com/users/johannhof/orgs","repos_url":"https://api.github.com/users/johannhof/repos","events_url":"https://api.github.com/users/johannhof/events{/privacy}","received_events_url":"https://api.github.com/users/johannhof/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-11T05:40:42Z","updated_at":"2015-07-15T15:01:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sebmarkbage/art/pulls/6","html_url":"https://github.com/sebmarkbage/art/pull/6","diff_url":"https://github.com/sebmarkbage/art/pull/6.diff","patch_url":"https://github.com/sebmarkbage/art/pull/6.patch"},"body":"When using react-art it's hard to understand how text is supposed to work, especially considering that\r\n```jsx\r\n<Text x={10} y={10}>Hello World!</Text>\r\n```\r\nrenders in SVG mode but not in canvas mode. \r\n\r\nThis is because in canvas mode, without specifying `font={fontSize:12}`, `lineHeight` in `renderShapeTo` turns to `NaN` and takes the `y` parameter down with it.\r\n\r\nConsidering the dramatic lack of documentation for this otherwise excellent library we should add a fallback so that people don't get demotivated and the render behaviour stays consistent."},"comment":{"url":"https://api.github.com/repos/sebmarkbage/art/issues/comments/121644484","html_url":"https://github.com/sebmarkbage/art/pull/6#issuecomment-121644484","issue_url":"https://api.github.com/repos/sebmarkbage/art/issues/6","id":121644484,"user":{"login":"johannhof","id":2622601,"avatar_url":"https://avatars.githubusercontent.com/u/2622601?v=3","gravatar_id":"","url":"https://api.github.com/users/johannhof","html_url":"https://github.com/johannhof","followers_url":"https://api.github.com/users/johannhof/followers","following_url":"https://api.github.com/users/johannhof/following{/other_user}","gists_url":"https://api.github.com/users/johannhof/gists{/gist_id}","starred_url":"https://api.github.com/users/johannhof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johannhof/subscriptions","organizations_url":"https://api.github.com/users/johannhof/orgs","repos_url":"https://api.github.com/users/johannhof/repos","events_url":"https://api.github.com/users/johannhof/events{/privacy}","received_events_url":"https://api.github.com/users/johannhof/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T15:01:54Z","updated_at":"2015-07-15T15:01:54Z","body":"I'm talking about this part\r\n```\r\n \t\tvar em = this._fontSize,\r\n \t\t    y = em / 2,\r\n \t\t    lineHeight = 1.1 * em,\r\n \t\t    lines = text,\r\n \t\t    l = lines.length;\r\n \r\n \t\tif (fill){\r\n \t\t\tcontext.fillStyle = fill;\r\n \t\t\tfor (var i = 0; i < l; i++)\r\n \t\t\t\tcontext.fillText(lines[i], 0, y + i * lineHeight);\r\n \t\t}\r\n```"}}