From 7d9a8a13630316b25e4725f66b8e1b7352d9e840 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Mon, 16 Dec 2024 17:06:33 +0100 Subject: [PATCH] pre-cache ascii range in font atlas --- src/ugui_font.c3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ugui_font.c3 b/src/ugui_font.c3 index 75316fe..6843da0 100644 --- a/src/ugui_font.c3 +++ b/src/ugui_font.c3 @@ -92,9 +92,9 @@ fn void! Font.load(&font, String name, ZString path, uint height, float scale) font.atlas.new(font.id, ATLAS_GRAYSCALE, size, size)!; // preallocate the ASCII range -// for (char c = ' '; c < '~'; c++) { -// font.get_glyph((Codepoint)c)!; -// } + for (char c = ' '; c < '~'; c++) { + font.get_glyph((Codepoint)c)!; + } } fn Glyph*! Font.get_glyph(&font, Codepoint code)