From 5c558586eba3b6cc13e66cfd8271d6d654fd2488 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 7 Feb 2022 18:54:16 -0600 Subject: [PATCH] [util/draw] Apply slant to non-user-fonts as well --- util/helper-cairo.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/helper-cairo.hh b/util/helper-cairo.hh index 40ea5d386..9be3d00d9 100644 --- a/util/helper-cairo.hh +++ b/util/helper-cairo.hh @@ -90,6 +90,9 @@ helper_cairo_create_scaled_font (const font_options_t *font_opts) cairo_matrix_init_scale (&font_matrix, font_opts->font_size_x, font_opts->font_size_y); + if (!helper_cairo_use_hb_draw (font_opts)) + font_matrix.xy = -font_opts->slant * font_opts->font_size_x; + font_options = cairo_font_options_create (); cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE); cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_OFF);