mirror of
https://github.com/alacritty/alacritty.git
synced 2026-11-25 15:15:51 +03:00
Change LoadGlyph in LoaderApi to match RenderApi
This commit is contained in:
1 parent
32cc53a901
commit
c9abf571f2
1 file changed
+6
-4
+6
-4
@@ -873,10 +873,12 @@ impl<'a> LoadGlyph for LoaderApi<'a> {
|
||||
match self.atlas[*self.current_atlas].insert(rasterized, &mut self.active_tex) {
|
||||
Ok(glyph) => glyph,
|
||||
Err(_) => {
|
||||
let atlas = Atlas::new(ATLAS_SIZE);
|
||||
*self.active_tex = 0; // Atlas::new binds a texture. Ugh this is sloppy.
|
||||
*self.current_atlas = 0;
|
||||
self.atlas.insert(0, atlas);
|
||||
*self.current_atlas += 1;
|
||||
if *self.current_atlas == self.atlas.len() {
|
||||
let atlas = Atlas::new(ATLAS_SIZE);
|
||||
*self.active_tex = 0; // Atlas::new binds a texture. Ugh this is sloppy.
|
||||
self.atlas.push(atlas);
|
||||
}
|
||||
self.load_glyph(rasterized)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user