aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2004-03-04 12:42:56 +0000
committerKenichi Handa2004-03-04 12:42:56 +0000
commitbb229eecd916a8d07cd4477ccb3f5816a5581e59 (patch)
treef98bb9fa6c485ec35ba444f0d6b19419becfb1d0 /src
parentfd6ce05bcd2cd50e6ae21640c2d8e6b214ac5bb3 (diff)
downloademacs-bb229eecd916a8d07cd4477ccb3f5816a5581e59.tar.gz
emacs-bb229eecd916a8d07cd4477ccb3f5816a5581e59.zip
(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,
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index a70e13f36c5..e68d17b2d61 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6215,6 +6215,12 @@ build_scalable_font_name (f, font, specified_pt)
6215 double resy = FRAME_X_DISPLAY_INFO (f)->resy; 6215 double resy = FRAME_X_DISPLAY_INFO (f)->resy;
6216 double pt; 6216 double pt;
6217 6217
6218 if (font->numeric[XLFD_PIXEL_SIZE] != 0
6219 || font->numeric[XLFD_POINT_SIZE] != 0)
6220 /* This is a scalable font but is requested for a specific size.
6221 We should not change that size. */
6222 return build_font_name (font);
6223
6218 /* If scalable font is for a specific resolution, compute 6224 /* If scalable font is for a specific resolution, compute
6219 the point size we must specify from the resolution of 6225 the point size we must specify from the resolution of
6220 the display and the specified resolution of the font. */ 6226 the display and the specified resolution of the font. */
@@ -6511,7 +6517,16 @@ try_font_list (f, pattern, family, registry, fonts)
6511 int nfonts = 0; 6517 int nfonts = 0;
6512 6518
6513 if (STRINGP (pattern)) 6519 if (STRINGP (pattern))
6514 nfonts = font_list (f, pattern, Qnil, Qnil, fonts); 6520 {
6521 nfonts = font_list (f, pattern, Qnil, Qnil, fonts);
6522 if (nfonts == 0 && ! EQ (Vscalable_fonts_allowed, Qt))
6523 {
6524 int count = SPECPDL_INDEX ();
6525 specbind (Qscalable_fonts_allowed, Qt);
6526 nfonts = font_list (f, pattern, Qnil, Qnil, fonts);
6527 unbind_to (count, Qnil);
6528 }
6529 }
6515 else 6530 else
6516 { 6531 {
6517 Lisp_Object tail; 6532 Lisp_Object tail;