mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-11 13:51:01 -05:00
Change LoadGlyph in LoaderApi to match RenderApi
This commit is contained in:
parent
32cc53a901
commit
c9abf571f2
1 changed files with 6 additions and 4 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue