all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Wrestling with set-fontset-font
@ 2019-12-23 18:15 Kévin Le Gouguec
  2019-12-23 20:02 ` Eli Zaretskii
  2019-12-27 18:52 ` use-default-font-for-symbols vs. emojis (was: Wrestling with set-fontset-font) Kévin Le Gouguec
  0 siblings, 2 replies; 8+ messages in thread
From: Kévin Le Gouguec @ 2019-12-23 18:15 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

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 #2: Type: application/emacs-lisp, Size: 153 bytes --]

[-- Attachment #3: Type: text/plain, Size: 331 bytes --]


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 #4: Type: application/emacs-lisp, Size: 108 bytes --]

(set-fontset-font t ?⚙ "Noto Color Emoji")
(set-fontset-font "fontset-startup" ?⚙ "Noto Color Emoji")

[-- Attachment #5: Type: text/plain, Size: 2044 bytes --]


- 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!)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-29 16:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-23 18:15 Wrestling with set-fontset-font Kévin Le Gouguec
2019-12-23 20:02 ` Eli Zaretskii
2019-12-27 18:52 ` use-default-font-for-symbols vs. emojis (was: Wrestling with set-fontset-font) Kévin Le Gouguec
2019-12-27 20:20   ` Eli Zaretskii
2019-12-27 20:32     ` use-default-font-for-symbols vs. emojis Eli Zaretskii
2019-12-27 23:40       ` Kévin Le Gouguec
2019-12-28  7:40         ` Eli Zaretskii
2019-12-29 16:14           ` Kévin Le Gouguec

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.