comparison src/xfaces.c @ 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 dd77c0989865
children 10387ba10fe5
comparison
equal deleted inserted replaced
89843:69acbaa5b570 89844:02a959f3ee57
6213 char pixel_size[20]; 6213 char pixel_size[20];
6214 int pixel_value; 6214 int pixel_value;
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. */
6221 if (font->numeric[XLFD_RESY] != 0) 6227 if (font->numeric[XLFD_RESY] != 0)
6222 { 6228 {
6509 struct font_name **fonts; 6515 struct font_name **fonts;
6510 { 6516 {
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;
6518 6533
6519 if (NILP (family)) 6534 if (NILP (family))