From 49491cf5f8e5ae9977e07c947ddb7d45412d08b5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 20 Feb 2024 18:52:39 -0500 Subject: [PATCH] gsk: Use unhinted extents for glyphs --- gsk/gpu/gskgpudevice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gsk/gpu/gskgpudevice.c b/gsk/gpu/gskgpudevice.c index bb1f1699f5..7d173b1dcf 100644 --- a/gsk/gpu/gskgpudevice.c +++ b/gsk/gpu/gskgpudevice.c @@ -11,6 +11,7 @@ #include "gdk/gdkprofilerprivate.h" #include "gsk/gskdebugprivate.h" +#include "gsk/gskprivate.h" #define MAX_SLICES_PER_ATLAS 64 @@ -918,7 +919,7 @@ gsk_gpu_device_lookup_glyph_image (GskGpuDevice *self, subpixel_x = (flags & 3) / 4.f; subpixel_y = ((flags >> 2) & 3) / 4.f; - pango_font_get_glyph_extents (font, glyph, &ink_rect, NULL); + pango_font_get_glyph_extents (gsk_get_unhinted_font (font), glyph, &ink_rect, NULL); origin.x = floor (ink_rect.x * scale / PANGO_SCALE + subpixel_x); origin.y = floor (ink_rect.y * scale / PANGO_SCALE + subpixel_y); rect.size.width = ceil ((ink_rect.x + ink_rect.width) * scale / PANGO_SCALE + subpixel_x) - origin.x;