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

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

Wrestling with set-fontset-font


From: Kévin Le Gouguec
Subject: Wrestling with set-fontset-font
Date: Mon, 23 Dec 2019 19:15:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Hello,

I would like to setup Emacs to look at Noto Color Emoji first, then at
Symbola, for characters belonging to the "symbol" script.  For a while I
thought this bit of configuration worked:

Attachment: binTcIPA2Cd57.bin
Description: application/emacs-lisp

Then I realized that for some reason, one specific character (⚙ U+2699
GEAR) remains stubbornly displayed with DejaVu Sans Mono.

I think the problem may stem from fontset-startup, but even after
reading everything the manual has to say about fontsets I still feel a
bit out of my depth.  From emacs -Q, after running:

Attachment: binFxzG37Aty6.bin
Description: application/emacs-lisp

- the GEAR character is still displayed with DejaVu Sans Mono; C-u C-x =
  says:

>               display: by this font (glyph code)
>     ftcrhb:-PfEd-DejaVu Sans 
> Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#xAE4)

- yet for both fontset-default and fontset-startup, M-x describe-fontset
  says:

> ⚙ (#x2699)
>    -*-Noto Color Emoji-*-*-*-*-*-*-*-*-*-*-*-*

- GEAR characters displayed with an italic face (e.g. with
 (insert (propertize "\n⚙\n" 'font-lock-face 'italic))
 ) are correctly shown with Noto Color Emoji.


So far I've only had this problem with ⚙ U+2699 GEAR, though I suspect
that any character covered by DejaVu Sans Mono would show similar
symptoms.  If instead, I run (set-fontset-font t ?🤷 "Noto Color Emoji")
(i.e. using U+1F937 SHRUG) from emacs -Q, then

- before running set-fontset-font, the character is displayed with
  Symbola; C-u C-x = says

>               display: by this font (glyph code)
>     
> ftcrhb:-UFAS-Symbola-normal-normal-semicondensed-*-15-*-*-*-*-0-iso10646-1 
> (#x2630)

- after running set-fonset-font, the character is displayed with Noto
  Color Emoji; C-u C-x = says

>               display: by this font (glyph code)
>     ftcrhb:-GOOG-Noto Color 
> Emoji-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x9EB)

- and M-x describe-fontset fontset-default says

> 🤷 (#x1F937)
>     -*-Noto Color Emoji-*-*-*-*-*-*-*-*-*-*-*-*
>       [-GOOG-Noto Color Emoji-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1]

  (Note the third line; if I understand describe-fontset's output
  correctly, this means that no font was opened for U+2699 GEAR?)


At this point, I don't know whether I am misunderstanding something
fundamental about fontsets, or if I am facing a bug.  I'm pretty sure
it's the former.  I don't know what else I should be looking at though…

If anyone has pointers to documentation I might have missed, that would
be greatly appreciated.

Cheers!


(I'm not subscribed to the list; thanks for keeping me CC'ed!)

reply via email to

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