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

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

bug#49797: 28.0.50; Setting face to custom fontset doesn't work


From: Yuan Fu
Subject: bug#49797: 28.0.50; Setting face to custom fontset doesn't work
Date: Sun, 1 Aug 2021 11:18:50 -0400

> 
> Personally, I lack a clear understanding of how user-defined fontsets
> are supposed to be used instead of the standard fontsets.  Is that
> only by using the :font attribute of a face?

The documentation of face attributes doesn't mention it for some reason, but I 
found another face attribute :fontset when reading the code. IIUC, according to 
realize_gui_face, when Emacs realize a face, it combines the fontset in :fonset 
attribute with the :font attribute (and other font attributes like :family, 
etc): the :fontset one is used as the base fontset, and we make ascii 
characters in the base fondest to use the font specified in the :font attribute 
(combined with other font attributes). This is done by 
make_fontset_for_ascii_face (the name is slightly misleading).

But in reality, it doesn’t seem to work like that; changing the default fontset 
seem to have an effect but changing custom fontset doesn't. I found this 
function fontset_font, in it we first find a font from the custom fontset, then 
try to find a font in the default fontset. So if the default fontset has an 
effect but the custom one doesn’t, maybe the code that finds font in the custom 
fontset has problem. That’s my uneducated conjecture, so take with a grain of 
salt.

Yuan






reply via email to

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