{"action":"created","issue":{"url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4642","repository_url":"https://api.github.com/repos/BabylonJS/Babylon.js","labels_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4642/labels{/name}","comments_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4642/comments","events_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4642/events","html_url":"https://github.com/BabylonJS/Babylon.js/issues/4642","id":337157096,"node_id":"MDU6SXNzdWUzMzcxNTcwOTY=","number":4642,"title":"TextBlock line-wrapping improvements","user":{"login":"adrientetar","id":1250894,"node_id":"MDQ6VXNlcjEyNTA4OTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1250894?v=4","gravatar_id":"","url":"https://api.github.com/users/adrientetar","html_url":"https://github.com/adrientetar","followers_url":"https://api.github.com/users/adrientetar/followers","following_url":"https://api.github.com/users/adrientetar/following{/other_user}","gists_url":"https://api.github.com/users/adrientetar/gists{/gist_id}","starred_url":"https://api.github.com/users/adrientetar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrientetar/subscriptions","organizations_url":"https://api.github.com/users/adrientetar/orgs","repos_url":"https://api.github.com/users/adrientetar/repos","events_url":"https://api.github.com/users/adrientetar/events{/privacy}","received_events_url":"https://api.github.com/users/adrientetar/received_events","type":"User","site_admin":false},"labels":[{"id":45382881,"node_id":"MDU6TGFiZWw0NTM4Mjg4MQ==","url":"https://api.github.com/repos/BabylonJS/Babylon.js/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":615691561,"node_id":"MDU6TGFiZWw2MTU2OTE1NjE=","url":"https://api.github.com/repos/BabylonJS/Babylon.js/labels/gui","name":"gui","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-29T22:41:10Z","updated_at":"2018-06-29T22:53:03Z","closed_at":null,"author_association":"NONE","body":"I'm looking to do line-wrapping on TextBlock, but there are a couple things missing:\r\n\r\n- I need to be able to get the final size of the block at creation time. Currently it seems one oughta wait until the TextBlock is rendered to get that (textBlock.height/heightInPixels isn't set), but I want to size my enclosing elements based on the size of the TextBlock so I'd need the value right away.\r\n- Looking at [textBlock.ts](https://github.com/BabylonJS/Babylon.js/blob/6d569bfece6d10b39323bb29c49c376d223c53ff/gui/src/2D/controls/textBlock.ts), the line breaking algorithm only uses LF and space as line-wrapping opportunities. To be robust from an i18n perspective it should rather use the Unicode line breaking algorithm ([UAX &#0035;&#xfeff;14](http://unicode.org/reports/tr14/)) – which [niklasvh/css-line-break](https://github.com/niklasvh/css-line-break) seems to be a solid implementation of.\r\n"},"comment":{"url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/comments/401493102","html_url":"https://github.com/BabylonJS/Babylon.js/issues/4642#issuecomment-401493102","issue_url":"https://api.github.com/repos/BabylonJS/Babylon.js/issues/4642","id":401493102,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTQ5MzEwMg==","user":{"login":"deltakosh","id":1306056,"node_id":"MDQ6VXNlcjEzMDYwNTY=","avatar_url":"https://avatars0.githubusercontent.com/u/1306056?v=4","gravatar_id":"","url":"https://api.github.com/users/deltakosh","html_url":"https://github.com/deltakosh","followers_url":"https://api.github.com/users/deltakosh/followers","following_url":"https://api.github.com/users/deltakosh/following{/other_user}","gists_url":"https://api.github.com/users/deltakosh/gists{/gist_id}","starred_url":"https://api.github.com/users/deltakosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deltakosh/subscriptions","organizations_url":"https://api.github.com/users/deltakosh/orgs","repos_url":"https://api.github.com/users/deltakosh/repos","events_url":"https://api.github.com/users/deltakosh/events{/privacy}","received_events_url":"https://api.github.com/users/deltakosh/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T22:53:03Z","updated_at":"2018-06-29T22:53:03Z","author_association":"CONTRIBUTOR","body":"Good plan! We can definitely make the size computation function publicly available\r\n\r\nFor the line breaker, also agree as long as it is not slowing things down"}}
{"actor":{"display_login":"deltakosh"}}