mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
fonts: Fix calculation of font underline thickness on macOS (#37029)
There was a typo in how underline thickness (in pixels) was converted to app units. It was interpreting the pixel value as an f64 app unit value, which meant that the resulting thickness was 1/60 of the value expected. Testing: macOS does not currently run WPT tests, so it is difficult to test this one. I have manually confirmed that underlines now show up and are the expected thickness. Fixes: #36945 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
cea4046a3f
commit
639eb7bc55
1 changed files with 1 additions and 1 deletions
|
@ -287,7 +287,7 @@ impl PlatformFontMethods for PlatformFont {
|
|||
.unwrap_or(average_advance);
|
||||
|
||||
let metrics = FontMetrics {
|
||||
underline_size: Au::from_f64_au(underline_thickness),
|
||||
underline_size: Au::from_f64_px(underline_thickness),
|
||||
// TODO(Issue #201): underline metrics are not reliable. Have to pull out of font table
|
||||
// directly.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue