Skip to content

Commit

Permalink
Calculate the underline offset relative to the baseline offset
Browse files Browse the repository at this point in the history
  • Loading branch information
fredizzimo committed Jul 8, 2024
1 parent 770bdcb commit 44edd05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/fonts/caching_shaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl CachingShaper {

pub fn underline_position(&mut self) -> f32 {
let metrics = self.metrics();
metrics.ascent - metrics.underline_offset + self.linespace / 2.
self.baseline_offset() - metrics.underline_offset
}

pub fn stroke_size(&mut self) -> f32 {
Expand Down

0 comments on commit 44edd05

Please sign in to comment.