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)
^
This commit is contained in:
Khaled Hosny 2021-09-11 00:12:03 +02:00
parent 39c20d2b9e
commit 34ff2d3ea6
1 changed files with 3 additions and 1 deletions

View File

@ -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;