(font_find_for_lface): Reflect LFACE_FONT in the font

preference.
This commit is contained in:
Kenichi Handa 2008-05-15 10:29:39 +00:00
parent fd8a1cae45
commit 79f105c988
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-05-15 Kenichi Handa <handa@m17n.org>
* font.c (font_find_for_lface): Reflect LFACE_FONT in the font
preference.
2008-05-15 Glenn Morris <rgm@gnu.org>
* emacs.c (USAGE1, standard_args): Remove -disable-font-backend.

View file

@ -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)))