pre-cache ascii range in font atlas
This commit is contained in:
parent
2e0c6333d3
commit
7d9a8a1363
@ -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)!;
|
font.atlas.new(font.id, ATLAS_GRAYSCALE, size, size)!;
|
||||||
|
|
||||||
// preallocate the ASCII range
|
// preallocate the ASCII range
|
||||||
// for (char c = ' '; c < '~'; c++) {
|
for (char c = ' '; c < '~'; c++) {
|
||||||
// font.get_glyph((Codepoint)c)!;
|
font.get_glyph((Codepoint)c)!;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Glyph*! Font.get_glyph(&font, Codepoint code)
|
fn Glyph*! Font.get_glyph(&font, Codepoint code)
|
||||||
|
Loading…
Reference in New Issue
Block a user