From 981e94505cf34da58fa776f21cef9ba82624776e Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 21 Mar 2023 22:06:04 -0300 Subject: [PATCH] vulkan/glyphcache: Add padding around ink rect This is what the GL renderer does, and it gets rid of the cutout characters. --- gsk/vulkan/gskvulkanglyphcache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gsk/vulkan/gskvulkanglyphcache.c b/gsk/vulkan/gskvulkanglyphcache.c index f1adefafca..e44aa4ab7a 100644 --- a/gsk/vulkan/gskvulkanglyphcache.c +++ b/gsk/vulkan/gskvulkanglyphcache.c @@ -381,6 +381,11 @@ gsk_vulkan_glyph_cache_lookup (GskVulkanGlyphCache *cache, pango_font_get_glyph_extents (font, glyph, &ink_rect, NULL); pango_extents_to_pixels (&ink_rect, NULL); + ink_rect.x -= 1; + ink_rect.y -= 1; + ink_rect.width += 2; + ink_rect.height += 2; + value->draw_x = ink_rect.x; value->draw_y = ink_rect.y; value->draw_width = ink_rect.width;