1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

; * src/ftcrfont.c (ftcrhbfont_end_hb_font): Improve commentary (bug#73752).

This commit is contained in:
Eli Zaretskii 2024-11-08 10:03:35 +02:00
parent 9149aa89ee
commit 775970a783

View File

@ -702,8 +702,12 @@ ftcrhbfont_end_hb_font (struct font *font, hb_font_t *hb_font)
eassert (hb_font == ftcrfont_info->hb_font); eassert (hb_font == ftcrfont_info->hb_font);
/* ftcrfont_info->hb_font holds a reference to the FT_Face returned by /* ftcrfont_info->hb_font holds a reference to the FT_Face returned by
cairo_ft_scaled_font_lock_face. Keeping it around after the cairo_ft_scaled_font_lock_face. Keeping it around after the matching
matching unlock call would violate the API contract (Bug#73752). */ 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); hb_font_destroy (ftcrfont_info->hb_font);
ftcrfont_info->hb_font = NULL; ftcrfont_info->hb_font = NULL;