From: Chong Yidong Date: Mon, 8 Aug 2011 14:49:34 +0000 (-0400) Subject: Don't lose extra font info when using the Fontconfig font cache. X-Git-Tag: emacs-pretest-24.0.90~104^2~124^2~62^2~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d56176114c8c9226a43db4bf68df562486e454ed;p=emacs.git 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 --- 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 ();