From e6b9b576b96e87a29047a3951ab2a6838e1df781 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 12 Mar 2023 11:56:21 +0000 Subject: Fix rendering issue for some versions of Harfbuzz. --- src/entry_backend/harfbuzz.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/entry_backend/harfbuzz.c') diff --git a/src/entry_backend/harfbuzz.c b/src/entry_backend/harfbuzz.c index 5026993..5f0a30e 100644 --- a/src/entry_backend/harfbuzz.c +++ b/src/entry_backend/harfbuzz.c @@ -619,6 +619,17 @@ void entry_backend_harfbuzz_init( cairo_set_font_options(entry->cairo[1].cr, opts); cairo_font_options_destroy(opts); + + /* + * Cairo changes the size of the font, which sometimes causes rendering + * of 'm' characters to mess up (as harfbuzz has already it when we + * measured it). We therefore have to notify harfbuzz of any potential + * changes here. + * + * In future, the recently-added hb-cairo interface would probably + * solve this issue. + */ + hb_ft_font_changed(hb->hb_font); } void entry_backend_harfbuzz_destroy(struct entry *entry) -- cgit v1.2.3