pos-tip
pos-tip copied to clipboard
Can't display symbol characters correctly when set use-default-font-for-symbols nil
The following pos-tip-show
call displays correctly when Emacs is started with -Q
.
(require 'pos-tip)
(pos-tip-show "‘eldoc--message’")
Screenshot
However, adding the symbol font and setting (setq use-default-font-for-symbols nil)
will cause pos-tip-show
displays incorrectly.
(set-face-attribute 'default nil :font (font-spec :family "Courier New" :size 14))
(setq use-default-font-for-symbols nil)
(set-fontset-font t 'symbol (font-spec :family "Segoe UI Symbol" :size 14) nil 'prepend)
(require 'pos-tip)
(pos-tip-show "‘eldoc--message’") ;
Screenshot
It can only display two characters.
Removing the line (setq use-default-font-for-symbols nil)
or set t
(default) can workaround the problem but we have to (setq use-default-font-for-symbols nil)
for some reason, see https://emacs.stackexchange.com/questions/81051/how-can-i-override-character-ranges-in-default-font
Environment: Emacs 29.3 on Windows 10 with pos-tip 0.4.7
Thanks.
Related issue: https://github.com/pitkali/pos-tip/issues/23