gfx: On the Mac, take the scale into account when determining the

x-height of a font.
This commit is contained in:
Patrick Walton 2016-10-07 18:12:51 -07:00
parent 7bf06ed459
commit 56b41fa2ea

View file

@ -317,7 +317,7 @@ impl FontHandleMethods for FontHandle {
strikeout_size: Au(0), // FIXME(Issue #942) strikeout_size: Au(0), // FIXME(Issue #942)
strikeout_offset: Au(0), // FIXME(Issue #942) strikeout_offset: Au(0), // FIXME(Issue #942)
leading: au_from_pt(leading), 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, em_size: em_size,
ascent: au_from_pt(ascent * scale), ascent: au_from_pt(ascent * scale),
descent: au_from_pt(descent * scale), descent: au_from_pt(descent * scale),