From 34ff2d3ea6b7d3b748d82266e86c4a4d3fe31585 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 11 Sep 2021 00:12:03 +0200 Subject: [PATCH] Fix build with -Dexperimental_api=true ../src/hb-style.cc:102:32: error: no matching function for call to 'hb_style_get_value' return _hb_angle_to_ratio (hb_style_get_value (HB_STYLE_TAG_SLANT_ANGLE)); ^~~~~~~~~~~~~~~~~~ ../src/hb-style.cc:99:1: note: candidate function not viable: requires 2 arguments, but 1 was provided hb_style_get_value (hb_font_t *font, hb_tag_t tag) ^ and ../src/hb-style.cc:80:1: error: unused function '_hb_ratio_to_angle' [-Werror,-Wunused-function] _hb_ratio_to_angle (float r) ^ --- src/hb-style.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-style.cc b/src/hb-style.cc index 951e8982d..1d26ac5dd 100644 --- a/src/hb-style.cc +++ b/src/hb-style.cc @@ -76,11 +76,13 @@ _hb_angle_to_ratio (float a) { return tanf (a * (M_PI / 180.f)); } +#if 0 static inline float _hb_ratio_to_angle (float r) { return atanf (r) * (180.f / M_PI); } +#endif /** * hb_style_get_value: @@ -99,7 +101,7 @@ float hb_style_get_value (hb_font_t *font, hb_tag_t tag) { if (unlikely (tag == HB_STYLE_TAG_SLANT_RATIO)) - return _hb_angle_to_ratio (hb_style_get_value (HB_STYLE_TAG_SLANT_ANGLE)); + return _hb_angle_to_ratio (hb_style_get_value (font, HB_STYLE_TAG_SLANT_ANGLE)); hb_style_tag_t style_tag = (hb_style_tag_t) tag; hb_face_t *face = font->face;