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-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f00523f45864a95c17bad7647868b8e36a532bf;p=emacs.git ; * src/ftcrfont.c (ftcrhbfont_end_hb_font): Improve commentary (bug#73752). (cherry picked from commit 775970a7831de930cd25ee592fb40004b1c2bc24) --- diff --git a/src/ftcrfont.c b/src/ftcrfont.c index ee111d18763..2ef85d4d566 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -710,8 +710,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;