Fix is_simple_advance check. Fixes #4614.

This commit is contained in:
dhneio 2015-02-23 04:36:18 -08:00 committed by Josh Matthews
parent 225d7d2ece
commit 069f53a25e
4 changed files with 10 additions and 2 deletions

View file

@ -156,8 +156,11 @@ fn is_simple_glyph_id(id: GlyphId) -> bool {
}
fn is_simple_advance(advance: Au) -> bool {
let unsigned_au = advance.to_u32().unwrap();
(unsigned_au & (GLYPH_ADVANCE_MASK >> GLYPH_ADVANCE_SHIFT as uint)) == unsigned_au
match advance.to_u32() {
Some(unsigned_au) =>
(unsigned_au & (GLYPH_ADVANCE_MASK >> GLYPH_ADVANCE_SHIFT as uint)) == unsigned_au,
None => false
}
}
type DetailedGlyphCount = u16;