I'm having a hard time getting unicode to properly displayed in GUI.
I'm trying to type poker cards unicode inside emacs GUI, 🂩 for instance. I would like to use font "Ubuntu Mono",
Here's what's really weird:
- Symbola works fine in GUI, as long as I have it installed.
- If I remove Symbola from my system, GUI will only show ugly hex-code block, which is glyphless fallback.
- TUI emacs is fine and shows the non-Symbola version. (Needless to say 🂩 can be properly displayed in terminal vim as well) Also, gedit and gvim works fine also. LibreOffice works fine as well.
To sum up, on my setting, I'm only experiencing problem with GUI emacs, which is really weird, since plenty of fonts installed on Ubuntu by default can display 🂩.
I'm wondering if there's some problem with my system setting or my build of emacs. Also, this link doesn't work for me. I'm getting
display: no font available on my GUI.
position: 1 of 1384 (0%), column: 0 character: 🂩 (displayed as 🂩) (codepoint 127145, #o370251, #x1f0a9) charset: unicode (Unicode (ISO10646)) code point in charset: 0x1F0A9 script: playing-cards syntax: w which means: word category: .:Base to input: type "C-x 8 RET 1f0a9" or "C-x 8 RET PLAYING CARD NINE OF SPADES" buffer code: #xF0 #x9F #x82 #xA9 file code: #xF0 #x9F #x82 #xA9 (encoded by coding system utf-8-unix) display: no font available Character code properties: customize what to show name: PLAYING CARD NINE OF SPADES general-category: So (Symbol, Other) decomposition: (127145) ('🂩') There is an overlay here: From 1 to 3 face hl-line priority -50 window #<window 3 on test.el> There are text properties here: fontified t [back]
Ubuntu 16.04 / 18.04 emacs 27.1 Spacemacs develop / emacs -Q
A few details in the comment below.
Symbola is installed, the following can be observed.
;; C-x C-e turns 🂩 into ugly hex-code (set-fontset-font nil ?🂩 "Ubuntu Mono") ;; C-x C-e turns 🂩 into what's shown in the Symbola image (set-fontset-font nil ?🂩 "Symbola") ;; This line actually works, but I have no idea why (set-fontset-font nil 'playing-cards (font-spec :script 'playing-cards))