bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19117: 25.0.50; emacs on x11 chooses different fonts for the same fa


From: Dima Kogan
Subject: bug#19117: 25.0.50; emacs on x11 chooses different fonts for the same face sometimes
Date: Sat, 27 Dec 2014 01:17:26 -0800

Stefan Monnier <address@hidden> writes:

> IIUC if `scalable-fonts-allowed' is set to nil, that's what should happen.

This was a VERY useful comment. I do not touch scalable-fonts-allowed,
so it should be the default (i.e. nil), meaning that I should already be
disallowing these fonts. Looking at it deeper I see that the font list
is obtained by xfont_list_pattern() in xfont.c. This is an XListFonts()
call, with emacs then filtering the resulting list in various ways.

I see XListFonts() return consistent results, but the post-filtering of
the list is inconsistent. Specifically, the inconsistent piece is
exactly the scalable_fonts_allowed check in xfont_list_pattern():

https://github.com/emacs-mirror/emacs/blob/162660c3639a68a7b71439bdd713d54f940274b8/src/xfont.c#L416

When we get here, scalable_fonts_allowed is sometimes non-nil, which is
the direct cause of my problem. Forcefully removing that check and
always assuming that it IS nil makes this bug go away.

I haven't verified this yet, but presumably scalable_fonts_allowed is
getting set to t in realize_basic_faces() in xfaces.c:

https://github.com/emacs-mirror/emacs/blob/162660c3639a68a7b71439bdd713d54f940274b8/src/xfaces.c#L5236

Any comment on that? That bit of code was there since 2001, so
presumably it's reasonable. Anybody know more?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]