From 148d88368013ba9bf70a7dd275b1a0f9c64fd45c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 13 May 2019 14:33:06 -0700 Subject: [PATCH] [test] Don't call deprecated API --- test/api/test-font.c | 3 --- test/api/test-shape.c | 16 ++-------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/test/api/test-font.c b/test/api/test-font.c index 669019404..c6738b400 100644 --- a/test/api/test-font.c +++ b/test/api/test-font.c @@ -146,9 +146,6 @@ _test_font_nil_funcs (hb_font_t *font) glyph = 3; g_assert (!hb_font_get_glyph (font, 17, 2, &glyph)); g_assert_cmpint (glyph, ==, 0); - - x = hb_font_get_glyph_h_kerning (font, 17, 19); - g_assert_cmpint (x, ==, 0); } static void diff --git a/test/api/test-shape.c b/test/api/test-shape.c index 146cf0f4a..8fbe7f70c 100644 --- a/test/api/test-shape.c +++ b/test/api/test-shape.c @@ -67,17 +67,6 @@ glyph_func (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, return FALSE; } -static hb_position_t -glyph_h_kerning_func (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t left, hb_codepoint_t right, - void *user_data HB_UNUSED) -{ - if (left == 1 && right == 2) - return -2; - - return 0; -} - static const char TesT[] = "TesT"; static void @@ -102,7 +91,6 @@ test_shape (void) ffuncs = hb_font_funcs_create (); hb_font_funcs_set_glyph_h_advance_func (ffuncs, glyph_h_advance_func, NULL, NULL); hb_font_funcs_set_nominal_glyph_func (ffuncs, glyph_func, malloc (10), free); - hb_font_funcs_set_glyph_h_kerning_func (ffuncs, glyph_h_kerning_func, NULL, NULL); hb_font_set_funcs (font, ffuncs, NULL, NULL); hb_font_funcs_destroy (ffuncs); @@ -118,8 +106,8 @@ test_shape (void) { const hb_codepoint_t output_glyphs[] = {1, 2, 3, 1}; - const hb_position_t output_x_advances[] = {9, 5, 5, 10}; - const hb_position_t output_x_offsets[] = {0, -1, 0, 0}; + const hb_position_t output_x_advances[] = {10, 6, 5, 10}; + const hb_position_t output_x_offsets[] = {0, 0, 0, 0}; unsigned int i; g_assert_cmpint (len, ==, 4); for (i = 0; i < len; i++) {