Update app_units to 0.4.1

This commit is contained in:
Manish Goregaokar 2017-05-17 13:07:12 -07:00
parent f05491166f
commit 2230332f46
16 changed files with 39 additions and 40 deletions

View file

@ -11,7 +11,7 @@ name = "gfx"
path = "lib.rs"
[dependencies]
app_units = "0.4"
app_units = "0.4.1"
bitflags = "0.7"
euclid = "0.11"
fnv = "1.0"

View file

@ -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.

View file

@ -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