* Unicode fonts not correctly displayed
@ 2023-10-17 8:48 Toni Schmidbauer
2023-10-17 11:07 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Toni Schmidbauer @ 2023-10-17 8:48 UTC (permalink / raw)
To: Help-gnu Emacs
hi,
i'm currently struggling with my font config in emacs:
========
(when (member "JetBrainsMono Nerd Font" (font-family-list))
(set-face-attribute 'default nil :font "JetBrainsMonoNerdFont")
(set-frame-font 'default "JetBrainsMonoNerdFont 20")
(set-face-font 'default "JetBrainsMonoNerdFont 20")
(set-face-font 'variable-pitch "JetBrainsMonoNerdFont 20"))
;; Emoji: 😄, 🤦, 🏴
(set-fontset-font t 'symbol "Segoe UI Emoji" nil 'append)
(set-fontset-font t 'symbol "Segoe UI Symbol" nil 'append)
(set-fontset-font t 'symbol "Noto Color Emoji" nil 'append)
;; should include 2b22
(set-fontset-font t 'symbol "Symbola" nil 'append)
;; added just for testing, does not work
(set-fontset-font t ?⬢ "Symbola")
========
this is the minimal config i tried (commented out everything else in
init.el).
emoji's are rendered ok but the unicode glyph u002b22, which should be
part of the Symbola font does not render (emacs displays 2b22).
when i run what-cursor-position with a prefix arg i get the following
information:
========
position: 874 of 1186 (74%), restriction: <40-1187>, column: 21
character: ⬢ (displayed as ⬢) (codepoint 11042, #o25442, #x2b22)
charset: unicode (Unicode (ISO10646))
code point in charset: 0x2B22
script: symbol
syntax: _ which means: symbol
category: .:Base
to input: type "C-x 8 RET 2b22" or "C-x 8 RET BLACK HEXAGON"
buffer code: #xE2 #xAC #xA2
file code: #xE2 #xAC #xA2 (encoded by coding system utf-8-unix)
display: no font available
Character code properties: customize what to show
name: BLACK HEXAGON
general-category: So (Symbol, Other)
decomposition: (11042) ('⬢')
There is an overlay here:
From 853 to 887
face hl-line
priority -50
window #<window 97 on *mu4e-draft*>
There are text properties here:
fontified t
========
so it tells me "no font available". i'm really struggling to understand
why...
any hints how this could be solved or debugged?
thanks for your valuable time
toni
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unicode fonts not correctly displayed
2023-10-17 8:48 Unicode fonts not correctly displayed Toni Schmidbauer
@ 2023-10-17 11:07 ` Eli Zaretskii
2023-10-18 13:50 ` Toni Schmidbauer
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2023-10-17 11:07 UTC (permalink / raw)
To: help-gnu-emacs
> From: Toni Schmidbauer <toni+help-gnu-emacs@stderr.at>
> Date: Tue, 17 Oct 2023 10:48:07 +0200
>
> (when (member "JetBrainsMono Nerd Font" (font-family-list))
> (set-face-attribute 'default nil :font "JetBrainsMonoNerdFont")
> (set-frame-font 'default "JetBrainsMonoNerdFont 20")
> (set-face-font 'default "JetBrainsMonoNerdFont 20")
> (set-face-font 'variable-pitch "JetBrainsMonoNerdFont 20"))
It is not recommended to set the fonts of both the 'default' and the
'variable-pitch' faces to the same font. They are supposed to look
differently, and the font used for the latter face is not supposed to
be monospaced.
> ;; Emoji: 😄, 🤦, 🏴
> (set-fontset-font t 'symbol "Segoe UI Emoji" nil 'append)
> (set-fontset-font t 'symbol "Segoe UI Symbol" nil 'append)
> (set-fontset-font t 'symbol "Noto Color Emoji" nil 'append)
If you want to set fonts for the 'symbol' pseudo-script, you should
set use-default-font-for-symbols to the nil value.
And why do you specify multiple fonts for the same range of
characters? That is also not recommended. Pick on font and stick to
it.
> ;; should include 2b22
> (set-fontset-font t 'symbol "Symbola" nil 'append)
This should not be necessary if you really have Symbola installed,
since Emacs configures the default fontset to use Symbola for the 2B00
block.
> emoji's are rendered ok but the unicode glyph u002b22, which should be
> part of the Symbola font does not render (emacs displays 2b22).
>
> when i run what-cursor-position with a prefix arg i get the following
> information:
>
> ========
> position: 874 of 1186 (74%), restriction: <40-1187>, column: 21
> character: ⬢ (displayed as ⬢) (codepoint 11042, #o25442, #x2b22)
> charset: unicode (Unicode (ISO10646))
> code point in charset: 0x2B22
> script: symbol
> syntax: _ which means: symbol
> category: .:Base
> to input: type "C-x 8 RET 2b22" or "C-x 8 RET BLACK HEXAGON"
> buffer code: #xE2 #xAC #xA2
> file code: #xE2 #xAC #xA2 (encoded by coding system utf-8-unix)
> display: no font available
>
> Character code properties: customize what to show
> name: BLACK HEXAGON
> general-category: So (Symbol, Other)
> decomposition: (11042) ('⬢')
>
> There is an overlay here:
> From 853 to 887
> face hl-line
> priority -50
> window #<window 97 on *mu4e-draft*>
>
>
> There are text properties here:
> fontified t
> ========
>
> so it tells me "no font available". i'm really struggling to understand
> why...
Because your font configuration is, how should I put it? messy...
I suggest to start from "emacs -Q" and only add non-default font
settings if the defaults don't work well. (Assuming you use a recent
Emacs version; you didn't say.)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unicode fonts not correctly displayed
2023-10-17 11:07 ` Eli Zaretskii
@ 2023-10-18 13:50 ` Toni Schmidbauer
0 siblings, 0 replies; 3+ messages in thread
From: Toni Schmidbauer @ 2023-10-18 13:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
thanks for getting back!
Eli Zaretskii <eliz@gnu.org> writes:
> It is not recommended to set the fonts of both the 'default' and the
> 'variable-pitch' faces to the same font. They are supposed to look
> differently, and the font used for the latter face is not supposed to
> be monospaced.
ok thanks for the hint, this is chaos from a) not exactly knowing what
i'm doing b) being desperate to get emojis working :-)
>
>> ;; Emoji: 😄, 🤦, 🏴
>> (set-fontset-font t 'symbol "Segoe UI Emoji" nil 'append)
>> (set-fontset-font t 'symbol "Segoe UI Symbol" nil 'append)
>> (set-fontset-font t 'symbol "Noto Color Emoji" nil 'append)
>
> If you want to set fonts for the 'symbol' pseudo-script, you should
> set use-default-font-for-symbols to the nil value.
>
> And why do you specify multiple fonts for the same range of
> characters? That is also not recommended. Pick on font and stick to
> it.
because i was desperate :-) my vterm prompt wasn't working and also the
modeline did not display any icons (emojis).
>
>> ;; should include 2b22
>> (set-fontset-font t 'symbol "Symbola" nil 'append)
>
> This should not be necessary if you really have Symbola installed,
> since Emacs configures the default fontset to use Symbola for the 2B00
> block.
>
>> emoji's are rendered ok but the unicode glyph u002b22, which should be
>> part of the Symbola font does not render (emacs displays 2b22).
>>
>> when i run what-cursor-position with a prefix arg i get the following
>> information:
>>
>> ========
>> position: 874 of 1186 (74%), restriction: <40-1187>, column: 21
>> character: ⬢ (displayed as ⬢) (codepoint 11042, #o25442, #x2b22)
>> charset: unicode (Unicode (ISO10646))
>> code point in charset: 0x2B22
>> script: symbol
>> syntax: _ which means: symbol
>> category: .:Base
>> to input: type "C-x 8 RET 2b22" or "C-x 8 RET BLACK HEXAGON"
>> buffer code: #xE2 #xAC #xA2
>> file code: #xE2 #xAC #xA2 (encoded by coding system utf-8-unix)
>> display: no font available
>>
>> Character code properties: customize what to show
>> name: BLACK HEXAGON
>> general-category: So (Symbol, Other)
>> decomposition: (11042) ('⬢')
>>
>> There is an overlay here:
>> From 853 to 887
>> face hl-line
>> priority -50
>> window #<window 97 on *mu4e-draft*>
>>
>>
>> There are text properties here:
>> fontified t
>> ========
>>
>> so it tells me "no font available". i'm really struggling to understand
>> why...
>
> Because your font configuration is, how should I put it? messy...
it's a shit-show, let's be honest here.
> I suggest to start from "emacs -Q" and only add non-default font
> settings if the defaults don't work well. (Assuming you use a recent
> Emacs version; you didn't say.)
will try that. my emacs config is +10 years old, maybe it's time to
start over.
i'm running GNU Emacs 29.1.50 (build 1, x86_64-pc-linux-gnu, GTK+
Version 3.24.38, cairo version 1.17.8) of 2023-09-08 (compiled from the
emasc-29 branch), sorry for that.
thanks for the hints, will start over.
toni
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-18 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17 8:48 Unicode fonts not correctly displayed Toni Schmidbauer
2023-10-17 11:07 ` Eli Zaretskii
2023-10-18 13:50 ` Toni Schmidbauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).