mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix is_simple_advance check. Fixes #4614.
This commit is contained in:
parent
225d7d2ece
commit
069f53a25e
4 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue