gfx: Use subpixel positioning for glyphs.

Improves text rendering significantly.
This commit is contained in:
Patrick Walton 2014-10-02 08:04:24 -07:00
parent c7915028b4
commit dbdfce0695
2 changed files with 8 additions and 2 deletions

View file

@ -200,6 +200,12 @@ impl Au {
((s as f64) / 60f64).round() as int
}
#[inline]
pub fn to_subpx(&self) -> f64 {
let Au(s) = *self;
(s as f64) / 60f64
}
#[inline]
pub fn to_snapped(&self) -> Au {
let Au(s) = *self;