mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
mac: Treat CT returning 0 glyph indexes as failing to find indexes.
This commit is contained in:
parent
fc2d810bce
commit
496e2f621d
1 changed files with 2 additions and 3 deletions
|
@ -239,15 +239,14 @@ impl FontHandleMethods for FontHandle {
|
||||||
|
|
||||||
let result = unsafe {
|
let result = unsafe {
|
||||||
self.ctfont
|
self.ctfont
|
||||||
.get_glyphs_for_characters(&characters[0], &mut glyphs[0], count)
|
.get_glyphs_for_characters(characters.as_ptr(), glyphs.as_mut_ptr(), count)
|
||||||
};
|
};
|
||||||
|
|
||||||
if !result {
|
if !result || glyphs[0] == 0 {
|
||||||
// No glyph for this character
|
// No glyph for this character
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_ne!(glyphs[0], 0); // FIXME: error handling
|
|
||||||
return Some(glyphs[0] as GlyphId);
|
return Some(glyphs[0] as GlyphId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue