pos-tip icon indicating copy to clipboard operation
pos-tip copied to clipboard

Can't display Chinese characters correctly

Open chansey97 opened this issue 8 months ago • 0 comments

The following pos-tip-show call displays correctly when Emacs is started with -Q.

(require 'pos-tip)
(pos-tip-show "你好")

Screenshot

image

The default font under the "你好" is harfbuzz:-outline-MS Gothic-regular-normal-normal-mono-13-*-*-*-c-*-gb2312.1980-0 (#xC3C).

However, changing font will cause pos-tip-show displays incorrectly.

(set-fontset-font t 'han (font-spec :family "Microsoft YaHei" :size 14) nil nil)

(require 'pos-tip)
(pos-tip-show "你好")

Screenshot

image

It can only display half a character. Changing coding-system to utf-8 doesn't help.

Environment: Emacs 29.3 on Windows 10 with pos-tip 0.4.7

Thanks.

Related issue: https://github.com/pitkali/pos-tip/issues/22

chansey97 avatar Jun 04 '24 00:06 chansey97