From: Eli Zaretskii Date: Fri, 8 Nov 2024 08:03:35 +0000 (+0200) Subject: ; * src/ftcrfont.c (ftcrhbfont_end_hb_font): Improve commentary (bug#73752). X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~288 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=775970a7831de930cd25ee592fb40004b1c2bc24;p=emacs.git ; * src/ftcrfont.c (ftcrhbfont_end_hb_font): Improve commentary (bug#73752). --- diff --git a/src/ftcrfont.c b/src/ftcrfont.c index c2e6785a76a..32f77b03d37 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -702,8 +702,12 @@ ftcrhbfont_end_hb_font (struct font *font, hb_font_t *hb_font) eassert (hb_font == ftcrfont_info->hb_font); /* ftcrfont_info->hb_font holds a reference to the FT_Face returned by - cairo_ft_scaled_font_lock_face. Keeping it around after the - matching unlock call would violate the API contract (Bug#73752). */ + cairo_ft_scaled_font_lock_face. Keeping it around after the matching + unlock call would violate the API contract, and cause corrupted + display of composed characters (Bug#73752). We destroy and NULLify + hb_font here, which will then cause fthbfont_begin_hb_font, called by + ftcrhbfont_begin_hb_font, to recreate hb_font anew, taking into + consideration any scale changes in FT_Face. */ hb_font_destroy (ftcrfont_info->hb_font); ftcrfont_info->hb_font = NULL;