diff options
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-paint.hh')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-paint.hh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-paint.hh b/src/3rdparty/harfbuzz-ng/src/hb-paint.hh index f7b71aa19b..56b790dbee 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-paint.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-paint.hh @@ -32,6 +32,7 @@ #define HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS \ HB_PAINT_FUNC_IMPLEMENT (push_transform) \ HB_PAINT_FUNC_IMPLEMENT (pop_transform) \ + HB_PAINT_FUNC_IMPLEMENT (color_glyph) \ HB_PAINT_FUNC_IMPLEMENT (push_clip_glyph) \ HB_PAINT_FUNC_IMPLEMENT (push_clip_rectangle) \ HB_PAINT_FUNC_IMPLEMENT (pop_clip) \ @@ -77,6 +78,13 @@ struct hb_paint_funcs_t void pop_transform (void *paint_data) { func.pop_transform (this, paint_data, !user_data ? nullptr : user_data->pop_transform); } + bool color_glyph (void *paint_data, + hb_codepoint_t glyph, + hb_font_t *font) + { return func.color_glyph (this, paint_data, + glyph, + font, + !user_data ? nullptr : user_data->push_clip_glyph); } void push_clip_glyph (void *paint_data, hb_codepoint_t glyph, hb_font_t *font) @@ -203,8 +211,8 @@ struct hb_paint_funcs_t if (!a) return false; - float cc = cosf (a * (float) M_PI); - float ss = sinf (a * (float) M_PI); + float cc = cosf (a * HB_PI); + float ss = sinf (a * HB_PI); push_transform (paint_data, cc, ss, -ss, cc, 0.f, 0.f); return true; } @@ -216,8 +224,8 @@ struct hb_paint_funcs_t if (!sx && !sy) return false; - float x = tanf (-sx * (float) M_PI); - float y = tanf (+sy * (float) M_PI); + float x = tanf (-sx * HB_PI); + float y = tanf (+sy * HB_PI); push_transform (paint_data, 1.f, y, x, 1.f, 0.f, 0.f); return true; } |