mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
parent
16c047b08a
commit
22ccd7b4b1
1 changed files with 6 additions and 4 deletions
|
@ -900,10 +900,12 @@ impl<'a> LoadGlyph for RenderApi<'a> {
|
||||||
match self.atlas[*self.current_atlas].insert(rasterized, &mut self.active_tex) {
|
match self.atlas[*self.current_atlas].insert(rasterized, &mut self.active_tex) {
|
||||||
Ok(glyph) => glyph,
|
Ok(glyph) => glyph,
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
let atlas = Atlas::new(ATLAS_SIZE);
|
*self.current_atlas += 1;
|
||||||
*self.active_tex = 0; // Atlas::new binds a texture. Ugh this is sloppy.
|
if *self.current_atlas == self.atlas.len() {
|
||||||
*self.current_atlas = 0;
|
let atlas = Atlas::new(ATLAS_SIZE);
|
||||||
self.atlas.push(atlas);
|
*self.active_tex = 0; // Atlas::new binds a texture. Ugh this is sloppy.
|
||||||
|
self.atlas.push(atlas);
|
||||||
|
}
|
||||||
self.load_glyph(rasterized)
|
self.load_glyph(rasterized)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue