aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Ruffing2024-11-07 03:09:09 +0100
committerEli Zaretskii2024-11-08 09:56:54 +0200
commit9149aa89ee860627cc91e27c8659ad6f4efcfcd8 (patch)
treeb44ec6bf1bc9fbc115302480caf03287c7380981 /src
parent3bf00777be1e28d3d0e49692071825580f472037 (diff)
downloademacs-9149aa89ee860627cc91e27c8659ad6f4efcfcd8.tar.gz
emacs-9149aa89ee860627cc91e27c8659ad6f4efcfcd8.zip
Fix display of compositions when font style changes (Cairo backend)
* src/ftcrfont.c (ftcrhbfont_end_hb_font): Don't persist the result of 'cairo_ft_scaled_font_lock_face' in violation of the API contract. (Bug#73752)
Diffstat (limited to 'src')
-rw-r--r--src/ftcrfont.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 5ee375c782b..c2e6785a76a 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -700,6 +700,13 @@ ftcrhbfont_end_hb_font (struct font *font, hb_font_t *hb_font)
700 struct font_info *ftcrfont_info = (struct font_info *) font; 700 struct font_info *ftcrfont_info = (struct font_info *) font;
701 cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font; 701 cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
702 702
703 eassert (hb_font == ftcrfont_info->hb_font);
704 /* ftcrfont_info->hb_font holds a reference to the FT_Face returned by
705 cairo_ft_scaled_font_lock_face. Keeping it around after the
706 matching unlock call would violate the API contract (Bug#73752). */
707 hb_font_destroy (ftcrfont_info->hb_font);
708 ftcrfont_info->hb_font = NULL;
709
703 cairo_ft_scaled_font_unlock_face (scaled_font); 710 cairo_ft_scaled_font_unlock_face (scaled_font);
704 ftcrfont_info->ft_size = NULL; 711 ftcrfont_info->ft_size = NULL;
705} 712}