From 79f105c9882f5314380da7db1b39c37b4186f2e1 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 15 May 2008 10:29:39 +0000 Subject: [PATCH] (font_find_for_lface): Reflect LFACE_FONT in the font preference. --- src/ChangeLog | 5 +++++ src/font.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 25626fb0060..089afb97ecc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-05-15 Kenichi Handa + + * font.c (font_find_for_lface): Reflect LFACE_FONT in the font + preference. + 2008-05-15 Glenn Morris * emacs.c (USAGE1, standard_args): Remove -disable-font-backend. diff --git a/src/font.c b/src/font.c index 107426e6d6f..653db011039 100644 --- a/src/font.c +++ b/src/font.c @@ -2780,6 +2780,14 @@ font_find_for_lface (f, attrs, spec, c) double pt; for (i = 0; i < FONT_EXTRA_INDEX; i++) ASET (prefer, i, AREF (spec, i)); + if (FONTP (attrs[LFACE_FONT_INDEX])) + { + Lisp_Object face_font = attrs[LFACE_FONT_INDEX]; + + for (i = 0; i < FONT_EXTRA_INDEX; i++) + if (NILP (AREF (prefer, i))) + ASET (prefer, i, AREF (face_font, i)); + } if (NILP (AREF (prefer, FONT_FAMILY_INDEX))) font_parse_family_registry (attrs[LFACE_FAMILY_INDEX], Qnil, prefer); if (NILP (AREF (prefer, FONT_WEIGHT_INDEX))) -- 2.39.2