aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/text
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2017-05-17 13:07:12 -0700
committerManish Goregaokar <manishsmail@gmail.com>2017-05-19 20:33:02 -0700
commit2230332f460bea9550bfc07affa129ae64ae49b7 (patch)
treec3fecc2ac8bf3067770de0dc3f2289573e0bcf9b /components/gfx/text
parentf05491166f21879f74758b2f03bbc4c4a4c31eb8 (diff)
downloadservo-2230332f460bea9550bfc07affa129ae64ae49b7.tar.gz
servo-2230332f460bea9550bfc07affa129ae64ae49b7.zip
Update app_units to 0.4.1
Diffstat (limited to 'components/gfx/text')
-rw-r--r--components/gfx/text/glyph.rs4
-rw-r--r--components/gfx/text/shaping/harfbuzz.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs
index 513ac8fd65a..21692cd8d5f 100644
--- a/components/gfx/text/glyph.rs
+++ b/components/gfx/text/glyph.rs
@@ -110,7 +110,7 @@ pub type DetailedGlyphCount = u16;
impl GlyphEntry {
#[inline(always)]
fn advance(&self) -> Au {
- Au(((self.value & GLYPH_ADVANCE_MASK) >> GLYPH_ADVANCE_SHIFT) as i32)
+ Au::new(((self.value & GLYPH_ADVANCE_MASK) >> GLYPH_ADVANCE_SHIFT) as i32)
}
#[inline]
@@ -629,7 +629,7 @@ impl<'a> GlyphStore {
leftover_spaces += 1;
}
}
- Au(advance) + leftover_advance + extra_word_spacing * (spaces + leftover_spaces)
+ Au::new(advance) + leftover_advance + extra_word_spacing * (spaces + leftover_spaces)
}
/// When SIMD isn't available, fallback to the slow path.
diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs
index 0449961ded1..19827c2b191 100644
--- a/components/gfx/text/shaping/harfbuzz.rs
+++ b/components/gfx/text/shaping/harfbuzz.rs
@@ -404,7 +404,7 @@ impl Shaper {
if character == ' ' || character == '\u{a0}' {
// https://drafts.csswg.org/css-text-3/#word-spacing-property
let (length, percent) = options.word_spacing;
- advance = (advance + length) + Au((advance.0 as f32 * percent.into_inner()) as i32);
+ advance = (advance + length) + Au::new((advance.0 as f32 * percent.into_inner()) as i32);
}
advance