mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update webrender to 923ee495bd9b0fda8a4a94c5a6cf42e2f0548731.
This commit is contained in:
parent
d13172845c
commit
171469c27c
14 changed files with 128 additions and 120 deletions
|
@ -235,9 +235,11 @@ impl FontHandleMethods for FontHandle {
|
|||
let mut glyphs: [CGGlyph; 1] = [0 as CGGlyph];
|
||||
let count: CFIndex = 1;
|
||||
|
||||
let result = self
|
||||
.ctfont
|
||||
.get_glyphs_for_characters(&characters[0], &mut glyphs[0], count);
|
||||
let result = unsafe {
|
||||
self
|
||||
.ctfont
|
||||
.get_glyphs_for_characters(&characters[0], &mut glyphs[0], count)
|
||||
};
|
||||
|
||||
if !result {
|
||||
// No glyph for this character
|
||||
|
@ -263,12 +265,14 @@ impl FontHandleMethods for FontHandle {
|
|||
|
||||
fn glyph_h_advance(&self, glyph: GlyphId) -> Option<FractionalPixel> {
|
||||
let glyphs = [glyph as CGGlyph];
|
||||
let advance = self.ctfont.get_advances_for_glyphs(
|
||||
kCTFontDefaultOrientation,
|
||||
&glyphs[0],
|
||||
ptr::null_mut(),
|
||||
1,
|
||||
);
|
||||
let advance = unsafe {
|
||||
self.ctfont.get_advances_for_glyphs(
|
||||
kCTFontDefaultOrientation,
|
||||
&glyphs[0],
|
||||
ptr::null_mut(),
|
||||
1,
|
||||
)
|
||||
};
|
||||
Some(advance as FractionalPixel)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue