Refactored FontRenderer, fixed Sandbox2D

This commit is contained in:
Simon Lübeß
2021-08-15 13:20:38 +02:00
parent f5f3bad8db
commit d200c2c849
4 changed files with 6 additions and 4 deletions
@@ -61,8 +61,8 @@ namespace GlitchyEngine.Renderer.Text
List<Texture2D> atlasses = scope .();
// freetype identifies glyphs using utf32 (which makes sense), so we enumerate the text as char32
for(char32 char in String.UTF8Enumerator(text, 0, text.Length))
// enumerate through the unicode codepoints
for(char32 char in text.DecodedChars)
{
if(char == '\n')
{