summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2023-03-12 11:56:21 +0000
committerPhil Jones <philj56@gmail.com>2023-03-12 11:56:21 +0000
commite6b9b576b96e87a29047a3951ab2a6838e1df781 (patch)
treec4d04b6650ae2fe3e3a7ee86bac5c114dfc4b4eb
parent52ea28acc4b01b221515339ab225cd385abe8b0a (diff)
Fix rendering issue for some versions of Harfbuzz.
-rw-r--r--src/entry_backend/harfbuzz.c11
1 files changed, 11 insertions, 0 deletions
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)