Position underlines at a distance proportional to the line descent
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
b9b255652f
commit
3f6960bd34
1 changed files with 7 additions and 1 deletions
|
@ -272,7 +272,13 @@ impl Line {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(run_underline) = run_underline {
|
if let Some(run_underline) = run_underline {
|
||||||
underline.get_or_insert((glyph_origin, *run_underline));
|
underline.get_or_insert((
|
||||||
|
vec2f(
|
||||||
|
glyph_origin.x(),
|
||||||
|
origin.y() + baseline_offset.y() + 0.618 * self.layout.descent,
|
||||||
|
),
|
||||||
|
*run_underline,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
run_end += *run_len as usize;
|
run_end += *run_len as usize;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue