mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-25 14:27:34 +00:00
(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,
This commit is contained in:
parent
fd6ce05bcd
commit
bb229eecd9
1 changed files with 16 additions and 1 deletions
17
src/xfaces.c
17
src/xfaces.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue