{"action":"created","issue":{"url":"https://api.github.com/repos/ocornut/imgui/issues/224","labels_url":"https://api.github.com/repos/ocornut/imgui/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/ocornut/imgui/issues/224/comments","events_url":"https://api.github.com/repos/ocornut/imgui/issues/224/events","html_url":"https://github.com/ocornut/imgui/issues/224","id":75595063,"number":224,"title":"Cannot dynamically add new fonts","user":{"login":"petrihakkinen","id":2853615,"avatar_url":"https://avatars.githubusercontent.com/u/2853615?v=3","gravatar_id":"","url":"https://api.github.com/users/petrihakkinen","html_url":"https://github.com/petrihakkinen","followers_url":"https://api.github.com/users/petrihakkinen/followers","following_url":"https://api.github.com/users/petrihakkinen/following{/other_user}","gists_url":"https://api.github.com/users/petrihakkinen/gists{/gist_id}","starred_url":"https://api.github.com/users/petrihakkinen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrihakkinen/subscriptions","organizations_url":"https://api.github.com/users/petrihakkinen/orgs","repos_url":"https://api.github.com/users/petrihakkinen/repos","events_url":"https://api.github.com/users/petrihakkinen/events{/privacy}","received_events_url":"https://api.github.com/users/petrihakkinen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-12T13:05:45Z","updated_at":"2015-05-12T14:18:42Z","closed_at":null,"body":"When I add a new font at runtime (after init) and rebuild the texture, the new font appears ok but existing fonts get corrupted. I think this happens because the glyphs move around in the font atlas but the texture coordinates of old fonts are not updated. Is it possible to somehow fix this without needing to readd all previously added fonts to the atlas?\r\n"},"comment":{"url":"https://api.github.com/repos/ocornut/imgui/issues/comments/101298366","html_url":"https://github.com/ocornut/imgui/issues/224#issuecomment-101298366","issue_url":"https://api.github.com/repos/ocornut/imgui/issues/224","id":101298366,"user":{"login":"ocornut","id":8225057,"avatar_url":"https://avatars.githubusercontent.com/u/8225057?v=3","gravatar_id":"","url":"https://api.github.com/users/ocornut","html_url":"https://github.com/ocornut","followers_url":"https://api.github.com/users/ocornut/followers","following_url":"https://api.github.com/users/ocornut/following{/other_user}","gists_url":"https://api.github.com/users/ocornut/gists{/gist_id}","starred_url":"https://api.github.com/users/ocornut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocornut/subscriptions","organizations_url":"https://api.github.com/users/ocornut/orgs","repos_url":"https://api.github.com/users/ocornut/repos","events_url":"https://api.github.com/users/ocornut/events{/privacy}","received_events_url":"https://api.github.com/users/ocornut/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T14:18:42Z","updated_at":"2015-05-12T14:18:42Z","body":"That last commit https://github.com/ocornut/imgui/commit/5df542c3c09f09676c6f54e539736351219b8bf4 allows to append new font.\r\n\r\nI moved the ClearInputData() from imgui to application side, so it is in the example applications but anyone integrating with their own engine can see more clearly what is being done.\r\nConnects to #220 only when calling ClearInputData() you'll notice that ImFontAtlas has taken ownership of the TTF blob."}}