From 2230332f460bea9550bfc07affa129ae64ae49b7 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Wed, 17 May 2017 13:07:12 -0700 Subject: Update app_units to 0.4.1 --- components/gfx/text/glyph.rs | 4 ++-- components/gfx/text/shaping/harfbuzz.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'components/gfx/text') 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 -- cgit v1.2.3