pre-cache ascii range in font atlas
This commit is contained in:
parent
2e0c6333d3
commit
7d9a8a1363
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue