Mercurial > emacs
changeset 89844:02a959f3ee57
(build_scalable_font_name): If the scalable font is requested for
a specific size, don't change that size.
(try_font_list): Try a scalable font also in the case that a
pattern string is specified,
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 04 Mar 2004 12:42:56 +0000 |
parents | 69acbaa5b570 |
children | 982dd1857a87 |
files | src/xfaces.c |
diffstat | 1 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfaces.c Thu Mar 04 07:49:52 2004 +0000 +++ b/src/xfaces.c Thu Mar 04 12:42:56 2004 +0000 @@ -6215,6 +6215,12 @@ double resy = FRAME_X_DISPLAY_INFO (f)->resy; double pt; + if (font->numeric[XLFD_PIXEL_SIZE] != 0 + || font->numeric[XLFD_POINT_SIZE] != 0) + /* This is a scalable font but is requested for a specific size. + We should not change that size. */ + return build_font_name (font); + /* If scalable font is for a specific resolution, compute the point size we must specify from the resolution of the display and the specified resolution of the font. */ @@ -6511,7 +6517,16 @@ int nfonts = 0; if (STRINGP (pattern)) - nfonts = font_list (f, pattern, Qnil, Qnil, fonts); + { + nfonts = font_list (f, pattern, Qnil, Qnil, fonts); + if (nfonts == 0 && ! EQ (Vscalable_fonts_allowed, Qt)) + { + int count = SPECPDL_INDEX (); + specbind (Qscalable_fonts_allowed, Qt); + nfonts = font_list (f, pattern, Qnil, Qnil, fonts); + unbind_to (count, Qnil); + } + } else { Lisp_Object tail;