"fixed" segfault with >00
idk if this is a compiler error but leaving the ascii pre-caching in results in the pointer to the font structure to be corrupted before font.get_glyph()
This commit is contained in:
parent
6839a7e06c
commit
ccca2be496
@ -112,10 +112,11 @@ fn void? Font.load(&font, String name, ZString path, uint height, float scale)
|
||||
ushort size = (ushort)font.size*(ushort)($$sqrt((float)FONT_CACHED));
|
||||
font.atlas.new(font.id, ATLAS_GRAYSCALE, size, size)!;
|
||||
|
||||
// preallocate the ASCII range
|
||||
for (char c = ' '; c < '~'; c++) {
|
||||
font.get_glyph((Codepoint)c)!;
|
||||
}
|
||||
// FIXME: this crashes with O1 or greater, why??
|
||||
// // preallocate the ASCII range
|
||||
// for (char c = ' '; c < '~'; c++) {
|
||||
// font.get_glyph((Codepoint)c)!;
|
||||
// }
|
||||
}
|
||||
|
||||
fn Glyph*? Font.get_glyph(&font, Codepoint code)
|
||||
|
Loading…
Reference in New Issue
Block a user