Update harfbuzz to 0.3

`hb_font_funcs_set_glyph_h_kerning_func` is gone but I couldn't find any
replacement. Kerning tests are passing and kerning seems fine on my
computer so I guess it's useless now ?
This commit is contained in:
Bastien Orivel 2019-04-27 22:46:12 +02:00
parent af077f8cf7
commit 6ced81cbf0
5 changed files with 18 additions and 34 deletions

View file

@ -24,7 +24,6 @@ use harfbuzz_sys::hb_feature_t;
use harfbuzz_sys::hb_font_create;
use harfbuzz_sys::hb_font_funcs_create;
use harfbuzz_sys::hb_font_funcs_set_glyph_h_advance_func;
use harfbuzz_sys::hb_font_funcs_set_glyph_h_kerning_func;
use harfbuzz_sys::hb_font_funcs_set_nominal_glyph_func;
use harfbuzz_sys::hb_font_set_funcs;
use harfbuzz_sys::hb_font_set_ppem;
@ -459,12 +458,6 @@ lazy_static! {
ptr::null_mut(),
None,
);
hb_font_funcs_set_glyph_h_kerning_func(
hb_funcs,
Some(glyph_h_kerning_func),
ptr::null_mut(),
None,
);
FontFuncs(hb_funcs)
};
@ -519,22 +512,6 @@ fn glyph_space_advance(font: *const Font) -> (hb_codepoint_t, f64) {
(space_glyph, space_advance)
}
extern "C" fn glyph_h_kerning_func(
_: *mut hb_font_t,
font_data: *mut c_void,
first_glyph: hb_codepoint_t,
second_glyph: hb_codepoint_t,
_: *mut c_void,
) -> hb_position_t {
let font: *mut Font = font_data as *mut Font;
assert!(!font.is_null());
unsafe {
let advance = (*font).glyph_h_kerning(first_glyph as GlyphId, second_glyph as GlyphId);
Shaper::float_to_fixed(advance)
}
}
// Callback to get a font table out of a font.
extern "C" fn font_table_func(
_: *mut hb_face_t,