From a935e4b0c256451f50b2c0886f4fed5152735b62 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 17 Dec 2022 12:59:58 -0500 Subject: [PATCH] [paint] Add synthetic slant to root transform --- src/hb-paint.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-paint.hh b/src/hb-paint.hh index e97072e4c..47088b41c 100644 --- a/src/hb-paint.hh +++ b/src/hb-paint.hh @@ -136,10 +136,11 @@ struct hb_paint_funcs_t hb_font_t *font) { int xscale, yscale; - float upem; + float upem, slant; hb_font_get_scale (font, &xscale, &yscale); + slant = hb_font_get_synthetic_slant (font); upem = hb_face_get_upem (hb_font_get_face (font)); - func.push_transform (this, paint_data, xscale/upem, 0, 0, yscale/upem, 0, 0, + func.push_transform (this, paint_data, xscale/upem, 0, slant * yscale/upem, yscale/upem, 0, 0, !user_data ? nullptr : user_data->push_transform); } void pop_root_transform (void *paint_data) { func.pop_transform (this, paint_data,