From 50b7fff0c6f38819a66735d66ebd670655b4e961 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 27 Dec 2022 17:37:42 -0700 Subject: [PATCH] [cairo] Fix text_to_glyphs scale factor --- src/hb-cairo.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/hb-cairo.cc b/src/hb-cairo.cc index 4b2f8e0a9..6e1822856 100644 --- a/src/hb-cairo.cc +++ b/src/hb-cairo.cc @@ -458,13 +458,7 @@ hb_cairo_text_to_glyphs (cairo_scaled_font_t *scaled_font, hb_buffer_guess_segment_properties (buffer); hb_shape (font, buffer, nullptr, 0); - double scale_factor = hb_cairo_font_face_get_scale_factor (cairo_scaled_font_get_font_face (scaled_font)); - if (!scale_factor) - { - cairo_matrix_t font_matrix; - cairo_scaled_font_get_scale_matrix (scaled_font, &font_matrix); - scale_factor = font->x_scale / font_matrix.xx; - } + double scale_factor = font->x_scale; hb_cairo_glyphs_from_buffer (buffer, true,