Initialize only visible characters

This fixes an off-by-two error in the renderer which initializes
characters 32 until 128 (inclusive) for each font whenever it is loaded.
The ascii visible range however just goes from 32 until 126 (inclusive).
This commit is contained in:
Christian Duerr 2019-09-19 23:15:06 +02:00 committed by GitHub
parent 9a14ca42d3
commit 71a818cb8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ impl GlyphCache {
fn load_glyphs_for_font<L: LoadGlyph>(&mut self, font: FontKey, loader: &mut L) {
let size = self.font_size;
for i in 32u8..=128u8 {
for i in 32u8..=126u8 {
self.get(GlyphKey { font_key: font, c: i as char, size }, loader);
}
}