diff options
Diffstat (limited to 'external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1')
-rw-r--r-- | external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1 | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1 b/external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1 deleted file mode 100644 index 43ed88221669..000000000000 --- a/external/harfbuzz/0001-font-Respect-subfont-slant-setting-in-hb-draw.patch.1 +++ /dev/null @@ -1,104 +0,0 @@ -From 060ecac949dca29a75538ddeedf015441296334b Mon Sep 17 00:00:00 2001 -From: Behdad Esfahbod <behdad@behdad.org> -Date: Wed, 23 Nov 2022 16:31:37 -0700 -Subject: [PATCH] [font] Respect subfont slant setting in hb-draw - -Fixes https://github.com/harfbuzz/harfbuzz/issues/3890 ---- - src/hb-font.cc | 34 ++++++++++++++++++++-------------- - 1 file changed, 20 insertions(+), 14 deletions(-) - -diff --git a/src/hb-font.cc b/src/hb-font.cc -index 93005f4f3..e1699ca2a 100644 ---- a/src/hb-font.cc -+++ b/src/hb-font.cc -@@ -518,6 +518,7 @@ typedef struct hb_font_get_glyph_shape_default_adaptor_t { - void *draw_data; - float x_scale; - float y_scale; -+ float slant; - } hb_font_get_glyph_shape_default_adaptor_t; - - static void -@@ -530,9 +531,10 @@ hb_draw_move_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; - float x_scale = adaptor->x_scale; - float y_scale = adaptor->y_scale; -+ float slant = adaptor->slant; - - adaptor->draw_funcs->emit_move_to (adaptor->draw_data, *st, -- x_scale * to_x, y_scale * to_y); -+ x_scale * to_x + slant * to_y, y_scale * to_y); - } - - static void -@@ -544,12 +546,13 @@ hb_draw_line_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, void *draw_data, - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; - float x_scale = adaptor->x_scale; - float y_scale = adaptor->y_scale; -+ float slant = adaptor->slant; - -- st->current_x *= x_scale; -- st->current_y *= y_scale; -+ st->current_x = st->current_x * x_scale + st->current_y * slant; -+ st->current_y = st->current_y * y_scale; - - adaptor->draw_funcs->emit_line_to (adaptor->draw_data, *st, -- x_scale * to_x, y_scale * to_y); -+ x_scale * to_x + slant * to_y, y_scale * to_y); - } - - static void -@@ -562,13 +565,14 @@ hb_draw_quadratic_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, void *draw_data - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; - float x_scale = adaptor->x_scale; - float y_scale = adaptor->y_scale; -+ float slant = adaptor->slant; - -- st->current_x *= x_scale; -- st->current_y *= y_scale; -+ st->current_x = st->current_x * x_scale + st->current_y * slant; -+ st->current_y = st->current_y * y_scale; - - adaptor->draw_funcs->emit_quadratic_to (adaptor->draw_data, *st, -- x_scale * control_x, y_scale * control_y, -- x_scale * to_x, y_scale * to_y); -+ x_scale * control_x + slant * control_y, y_scale * control_y, -+ x_scale * to_x + slant * to_y, y_scale * to_y); - } - - static void -@@ -582,14 +586,15 @@ hb_draw_cubic_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, void *draw_data, - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; - float x_scale = adaptor->x_scale; - float y_scale = adaptor->y_scale; -+ float slant = adaptor->slant; - -- st->current_x *= x_scale; -- st->current_y *= y_scale; -+ st->current_x = st->current_x * x_scale + st->current_y * slant; -+ st->current_y = st->current_y * y_scale; - - adaptor->draw_funcs->emit_cubic_to (adaptor->draw_data, *st, -- x_scale * control1_x, y_scale * control1_y, -- x_scale * control2_x, y_scale * control2_y, -- x_scale * to_x, y_scale * to_y); -+ x_scale * control1_x + slant * control1_y, y_scale * control1_y, -+ x_scale * control2_x + slant * control2_y, y_scale * control2_y, -+ x_scale * to_x + slant * to_y, y_scale * to_y); - } - - static void -@@ -624,7 +629,8 @@ hb_font_get_glyph_shape_default (hb_font_t *font, - draw_funcs, - draw_data, - (float) font->x_scale / (float) font->parent->x_scale, -- (float) font->y_scale / (float) font->parent->y_scale -+ (float) font->y_scale / (float) font->parent->y_scale, -+ (font->slant - font->parent->slant) * (float) font->x_scale / (float) font->parent->y_scale - }; - - font->parent->get_glyph_shape (glyph, --- -2.38.1 - |