From d56176114c8c9226a43db4bf68df562486e454ed Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 8 Aug 2011 10:49:34 -0400 Subject: [PATCH] Don't lose extra font info when using the Fontconfig font cache. * src/ftfont.c (ftfont_pattern_entity): Copy the extras argument to the font entity extracted from the cache. Fixes: debbugs:8109 --- src/ChangeLog | 5 +++++ src/ftfont.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ddd580fcc4c..4df4455e862 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-08 Chong Yidong + + * ftfont.c (ftfont_pattern_entity): Copy the extras argument to + the font entity extracted from the cache (Bug#8109). + 2011-08-07 Chong Yidong * composite.c (autocmp_chars): Don't reset point. That is done by diff --git a/src/ftfont.c b/src/ftfont.c index 4e313a89021..5c98073057c 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -214,6 +214,10 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra) for (i = 0; i < FONT_OBJLIST_INDEX; i++) ASET (val, i, AREF (entity, i)); + + ASET (val, FONT_EXTRA_INDEX, Fcopy_sequence (extra)); + font_put_extra (val, QCfont_entity, key); + return val; } entity = font_make_entity (); -- 2.39.2