What happened?
Here’s my font configuration from the config.el
(setq doom-font (font-spec :family "IBM Plex Mono" :size 10.0 :weight 'normal)
doom-unicode-font (font-spec :family "DejaVu Sans Mono" :size 10.0 :weight 'normal)
doom-variable-pitch-font (font-spec :family "IBM Plex Sans" :size 10.0 :weight 'normal))
The font IBM Plex Mono doesn’t have full unicode coverage, but provides a good chunk of symbols I need most of the time.
If I don’t have :ui unicode
set, emacs uses IBM Plex Mono only for ASCII, but for everything else, even if main font provides the glyphs, doom-unicode-font
is used. This matches the documented behavior.
However, if I have :ui unicode
enabled, emacs uses IBM Plex Mono when it can, but for missing glyphs ⌘
(place of interest \u2318
) it falls back to this:
position: 4726 of 5564 (85%), column: 42
character: ⌘ (displayed as ⌘) (codepoint 8984, #o21430, #x2318)
charset: unicode-bmp (Unicode Basic Multilingual Plane (U+0000..U+FFFF))
code point in charset: 0x2318
script: symbol
syntax: _ which means: symbol
category: .:Base, j:Japanese
to input: type "C-x 8 RET 2318" or "C-x 8 RET PLACE OF INTEREST SIGN"
buffer code: #xE2 #x8C #x98
file code: #xE2 #x8C #x98 (encoded by coding system utf-8-unix)
display: by this font (glyph code):
ftcrhb:-unknown-file-icons-normal-normal-normal-*-18-*-*-*-*-0-iso10646-1 (#x30)
Character code properties: customize what to show
name: PLACE OF INTEREST SIGN
old-name: COMMAND KEY
general-category: So (Symbol, Other)
decomposition: (8984) ('⌘')
There is an overlay here:
From 4684 to 4756
face hl-line
priority -50
window nil
There are text properties here:
face font-lock-string-face
fontified t
Expected behavior
I expect emacs to use doom-unicode-font
for missing glyphs when :ui unicode
is set
Notes on standalone mode
When emacs is configured for :ui unicode
, but executed without daemon, doom-unicode-font
will be used from the start until doom/reload-fonts
is called. Then the behavior will be as described above.
Is there a way to use main font for everything it provides, but fallback to unicode only for missing glyphs?