{"action":"closed","issue":{"url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/260","repository_url":"https://api.github.com/repos/LWJGL/lwjgl3","labels_url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/260/comments","events_url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/260/events","html_url":"https://github.com/LWJGL/lwjgl3/issues/260","id":195963042,"number":260,"title":"Some problems with nanovg text rendering","user":{"login":"ShchAlexander","id":6692636,"avatar_url":"https://avatars.githubusercontent.com/u/6692636?v=3","gravatar_id":"","url":"https://api.github.com/users/ShchAlexander","html_url":"https://github.com/ShchAlexander","followers_url":"https://api.github.com/users/ShchAlexander/followers","following_url":"https://api.github.com/users/ShchAlexander/following{/other_user}","gists_url":"https://api.github.com/users/ShchAlexander/gists{/gist_id}","starred_url":"https://api.github.com/users/ShchAlexander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShchAlexander/subscriptions","organizations_url":"https://api.github.com/users/ShchAlexander/orgs","repos_url":"https://api.github.com/users/ShchAlexander/repos","events_url":"https://api.github.com/users/ShchAlexander/events{/privacy}","received_events_url":"https://api.github.com/users/ShchAlexander/received_events","type":"User","site_admin":false},"labels":[{"id":22952618,"url":"https://api.github.com/repos/LWJGL/lwjgl3/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-12-16T01:54:08Z","updated_at":"2016-12-16T14:59:17Z","closed_at":"2016-12-16T14:59:17Z","body":"I found little issue with nanovg text rendering. \r\nthe issue exist when we are using pointer to the end of the string.\r\n\r\nProbably there should be the same result.\r\nI used font with special symmbols to render icons.\r\n\r\n<table width=\"10px\">\r\n<thead>\r\n<tr>\r\n<td><b>Pointer to the end is NULL</b></td>\r\n<td><b>Pointer to the end is actually pointer to the end</b></td>\r\n</tr>\r\n</thead>\r\n<tr><td colspan=\"2\">code difference</td></tr>\r\n<tr>\r\n<td><pre lang=\"java\">ByteBuffer byteText = memUTF8(text);\r\nlong start = memAddress(byteText);\r\n...\r\nnvgBeginPath(context);\r\nnvgFillColor(context, textColorN);\r\nnnvgText(context, bounds[0], bounds[1], start, 0);</pre></td>\r\n<td><pre lang=\"java\">ByteBuffer byteText = memUTF8(text);\r\nlong start = memAddress(byteText);\r\nlong end = start + byteText.remaining();\r\n...\r\nnvgBeginPath(context);\r\nnvgFillColor(context, textColorN);\r\nnnvgText(context, bounds[0], bounds[1], start, end);</pre></td>\r\n</tr>\r\n<tr>\r\n<td colspan=\"2\">result difference</td>\r\n</tr>\r\n<tr>\r\n<td><img src=\"https://cloud.githubusercontent.com/assets/6692636/21248294/1e8f5d70-c347-11e6-9722-9b04f8c3d132.png\" width=\"50\"/></td>\r\n<td><img src=\"https://cloud.githubusercontent.com/assets/6692636/21248303/354b3fde-c347-11e6-9531-1ab1c646d800.png\" width=\"50\"/></td>\r\n</tr>\r\n</table>\r\n\r\nProbably it could be related to this: \r\nhttps://github.com/memononen/nanovg/pull/333"}}
{"actor":{"display_login":"ShchAlexander"}}