diff options
| -rw-r--r-- | src/xfaces.c | 17 |
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; |