src/hb-font.cc | 10 +++++----- src/hb-font.h | 8 ++++---- src/hb-font.hh | 6 +++--- src/hb-ft.cc | 2 +- src/hb-ot-font.cc | 4 ++-- src/hb-ot-shape-fallback.cc | 42 +++++++++++++++++++++--------------------- 6 files changed, 36 insertions(+), 36 deletions(-)
New commits: commit e4f27f368f8f0509fa47f6a28f3984e90b40588f Author: Behdad Esfahbod <[email protected]> Date: Tue Oct 9 08:20:10 2018 -0400 Try fixing older bots diff --git a/src/hb-ot-shape-fallback.cc b/src/hb-ot-shape-fallback.cc index bf1fc8fb..556c3408 100644 --- a/src/hb-ot-shape-fallback.cc +++ b/src/hb-ot-shape-fallback.cc @@ -435,33 +435,33 @@ _hb_ot_shape_fallback_mark_position (const hb_ot_shape_plan_t *plan, } +struct hb_ot_shape_fallback_kern_driver_t +{ + hb_ot_shape_fallback_kern_driver_t (hb_font_t *font_, + hb_buffer_t *buffer) : + font (font_), direction (buffer->props.direction) {} + + hb_position_t get_kerning (hb_codepoint_t first, hb_codepoint_t second) const + { + hb_position_t kern = 0; + font->get_glyph_kerning_for_direction (first, second, + direction, + &kern, &kern); + return kern; + } + + hb_font_t *font; + hb_direction_t direction; +}; + /* Performs font-assisted kerning. */ void _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) { - struct driver_t - { - driver_t (hb_font_t *font_, - hb_buffer_t *buffer) : - font (font_), direction (buffer->props.direction) {} - - hb_position_t get_kerning (hb_codepoint_t first, hb_codepoint_t second) const - { - hb_position_t kern = 0; - font->get_glyph_kerning_for_direction (first, second, - direction, - &kern, &kern); - return kern; - } - - hb_font_t *font; - hb_direction_t direction; - } driver (font, buffer); - - hb_kern_machine_t<driver_t> machine (driver); - + hb_ot_shape_fallback_kern_driver_t driver (font, buffer); + hb_kern_machine_t<hb_ot_shape_fallback_kern_driver_t> machine (driver); machine.kern (font, buffer, plan->kern_mask); } commit bee93e269711a3eda4e7d762b730522564fe6e87 Author: Behdad Esfahbod <[email protected]> Date: Tue Oct 9 08:01:49 2018 -0400 Add const to get_*_advances API Ouch! diff --git a/src/hb-font.cc b/src/hb-font.cc index f4f2df7c..fa5e6614 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -179,7 +179,7 @@ static void hb_font_get_glyph_h_advances_default (hb_font_t* font, void* font_data HB_UNUSED, unsigned int count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride, @@ -211,7 +211,7 @@ static void hb_font_get_glyph_v_advances_default (hb_font_t* font, void* font_data HB_UNUSED, unsigned int count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride, @@ -808,7 +808,7 @@ hb_font_get_glyph_v_advance (hb_font_t *font, void hb_font_get_glyph_h_advances (hb_font_t* font, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride) @@ -826,7 +826,7 @@ hb_font_get_glyph_h_advances (hb_font_t* font, void hb_font_get_glyph_v_advances (hb_font_t* font, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride) @@ -1053,7 +1053,7 @@ HB_EXTERN void hb_font_get_glyph_advances_for_direction (hb_font_t* font, hb_direction_t direction, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride) diff --git a/src/hb-font.h b/src/hb-font.h index e13b0916..48450e99 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -134,7 +134,7 @@ typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; typedef void (*hb_font_get_glyph_advances_func_t) (hb_font_t* font, void* font_data, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, @@ -424,14 +424,14 @@ hb_font_get_glyph_v_advance (hb_font_t *font, HB_EXTERN void hb_font_get_glyph_h_advances (hb_font_t* font, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride); HB_EXTERN void hb_font_get_glyph_v_advances (hb_font_t* font, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride); @@ -487,7 +487,7 @@ HB_EXTERN void hb_font_get_glyph_advances_for_direction (hb_font_t* font, hb_direction_t direction, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride); diff --git a/src/hb-font.hh b/src/hb-font.hh index 8b19dd71..47f5261e 100644 --- a/src/hb-font.hh +++ b/src/hb-font.hh @@ -237,7 +237,7 @@ struct hb_font_t } inline void get_glyph_h_advances (unsigned int count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride) @@ -250,7 +250,7 @@ struct hb_font_t } inline void get_glyph_v_advances (unsigned int count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride) @@ -378,7 +378,7 @@ struct hb_font_t } inline void get_glyph_advances_for_direction (hb_direction_t direction, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index fcd87a07..79ce8f49 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -221,7 +221,7 @@ hb_ft_get_variation_glyph (hb_font_t *font HB_UNUSED, static void hb_ft_get_glyph_h_advances (hb_font_t* font, void* font_data, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 58208397..686c873d 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -66,7 +66,7 @@ hb_ot_get_variation_glyph (hb_font_t *font HB_UNUSED, static void hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, @@ -86,7 +86,7 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, static void hb_ot_get_glyph_v_advances (hb_font_t* font, void* font_data, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, _______________________________________________ HarfBuzz mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/harfbuzz
