Commit bb229eec authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(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,
parent fd6ce05b
......@@ -6215,6 +6215,12 @@ build_scalable_font_name (f, font, specified_pt)
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 @@ try_font_list (f, pattern, family, registry, fonts)
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment