]> git.eshelyaron.com Git - emacs.git/commitdiff
; * src/ftcrfont.c (ftcrhbfont_end_hb_font): Improve commentary (bug#73752).
authorEli Zaretskii <eliz@gnu.org>
Fri, 8 Nov 2024 08:03:35 +0000 (10:03 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 9 Nov 2024 15:47:25 +0000 (16:47 +0100)
(cherry picked from commit 775970a7831de930cd25ee592fb40004b1c2bc24)

src/ftcrfont.c

index ee111d18763e64ee0fd6d6eb648dcac7be12e149..2ef85d4d56637aecac813b95ce759a5d914a8762 100644 (file)
@@ -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;