mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
gfx: On the Mac, take the scale into account when determining the
x-height of a font.
This commit is contained in:
parent
7bf06ed459
commit
56b41fa2ea
1 changed files with 2 additions and 2 deletions
|
@ -306,7 +306,7 @@ impl FontHandleMethods for FontHandle {
|
|||
.map(Au::from_f64_px)
|
||||
.unwrap_or(max_advance_width);
|
||||
|
||||
let metrics = FontMetrics {
|
||||
let metrics = FontMetrics {
|
||||
underline_size: au_from_pt(self.ctfont.underline_thickness() as f64),
|
||||
// TODO(Issue #201): underline metrics are not reliable. Have to pull out of font table
|
||||
// directly.
|
||||
|
@ -317,7 +317,7 @@ impl FontHandleMethods for FontHandle {
|
|||
strikeout_size: Au(0), // FIXME(Issue #942)
|
||||
strikeout_offset: Au(0), // FIXME(Issue #942)
|
||||
leading: au_from_pt(leading),
|
||||
x_height: au_from_pt(self.ctfont.x_height() as f64),
|
||||
x_height: au_from_pt((self.ctfont.x_height() as f64) * scale),
|
||||
em_size: em_size,
|
||||
ascent: au_from_pt(ascent * scale),
|
||||
descent: au_from_pt(descent * scale),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue