mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Fix calculation of visible glyph bounds
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
26fe285408
commit
2d5abee655
1 changed files with 2 additions and 2 deletions
|
@ -272,7 +272,7 @@ impl Line {
|
|||
let mut color_end = 0;
|
||||
let mut color = Color::black();
|
||||
|
||||
let mut glyph_origin = baseline_origin;
|
||||
let mut glyph_origin = vec2f(0., 0.);
|
||||
let mut prev_position = 0.;
|
||||
for run in &self.layout.runs {
|
||||
for (glyph_ix, glyph) in run.glyphs.iter().enumerate() {
|
||||
|
@ -304,7 +304,7 @@ impl Line {
|
|||
font_id: run.font_id,
|
||||
font_size: self.layout.font_size,
|
||||
id: glyph.id,
|
||||
origin: origin + glyph_origin,
|
||||
origin: glyph_bounds.origin() + baseline_origin,
|
||||
color,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue