mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 06:12:16 +03:00
fix glyph y scale for color emoji
This commit is contained in:
parent
98c66b1919
commit
2b2e443c7b
@ -191,6 +191,7 @@ struct GlyphKey {
|
||||
|
||||
/// Caches a rendered glyph.
|
||||
/// The image data may be None for whitespace glyphs.
|
||||
#[derive(Debug)]
|
||||
struct CachedGlyph {
|
||||
has_color: bool,
|
||||
x_offset: isize,
|
||||
@ -758,8 +759,8 @@ impl<'a> TerminalWindow<'a> {
|
||||
(w as usize, h as usize)
|
||||
};
|
||||
|
||||
let scale_y = glyph_height.min(self.cell_height) as f32 / self.cell_height as f32;
|
||||
let scale_x = glyph.scale * (glyph_width as f32 / metric_width as f32);
|
||||
let scale_y = glyph.scale * glyph_height as f32 / self.cell_height as f32;
|
||||
let scale_x = glyph.scale * glyph_width as f32 / metric_width as f32;
|
||||
|
||||
let draw_y = base_y - (glyph.y_offset as isize + glyph.bearing_y);
|
||||
let draw_x = x + glyph.x_offset as isize + glyph.bearing_x;
|
||||
|
Loading…
Reference in New Issue
Block a user