[Top][All Lists]

[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: Eli Zaretskii
Subject: bug#19117: 25.0.50; emacs on x11 chooses different fonts for the same face sometimes
Date: Fri, 02 Jan 2015 11:43:54 +0200

> From: Dima Kogan <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Tue, 30 Dec 2014 20:06:38 -0800
> Eli Zaretskii <address@hidden> writes:
> >> From: Dima Kogan <address@hidden>
> >> Date: Tue, 30 Dec 2014 10:33:17 -0800
> >> Cc: address@hidden
> >> 
> >> I will patch xfont_list_pattern() to accept a 3rd type of
> >> scalable-fonts-allowed: 'fallback where we add these fonts only if no
> >> others are available, and in realize_basic_faces() I'll use THAT value.
> >> Does that sound reasonable?
> >
> > Please note that on MS-Windows the scalable fonts were always used in
> > this scenario, back with that code, and there was a comment explaining
> > that otherwise too few fonts will be available on Windows.
> Hi. I'm attaching patches. The first one does this:
>   scalable font logic now matches the docs and is more consistent
>   A nil value of scalable-fonts-allowed allows scalable fonts if no others
>   were found.  This is the previously-documented behavior.
>   realize_basic_faces() no longer forces scalable-fonts-allowed to t.  If
>   nil, some fonts will always be found even if only scalable fonts are
>   available, as set by the other part of this patch.
> This is simpler than what I proposed earlier, since it does not
> introduce a third setting to scalable-fonts-allowed: the default nil
> value is sufficient. The patch mimics the older behavior to loop through
> the whole font list a second time if no non-scalable fonts were found
> and some scalable fonts WERE found, but were skipped the first time
> around due to scalable-fonts-allowed. This fixes my bug. The patch
> touches many lines, but almost all of it is indentation.
> The second patch is mostly unrelated. It removes some redundant code.
> I don't believe the behavior on Windows should be affected at all, but I
> have not verified this.


I don't really know how to test these changes on Windows, since most
of the changes are in xfont.c, and the equivalent w32font.c has no
similar code that I could identify.  And since I'm not an expert on
fonts, I'm stuck.

I've built Emacs with your changes and verified that x-list-fonts
still returns the same number of fonts, and the buffer font selection
dialog still seems to offer the same list of fonts AFAICS.

Can you suggest any further way of testing the patch?

reply via email to

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