I'm trying to set default face to use PingFang Mono SC
font. But I notice that faces that don't use this font become italic unexpectedly. As one can see below the font-lock-comment-face
is italic, but it is not set to be (it's only set to use SF Pro
family).
The only weird part I notice is that the "oblique" word in describe-char
on the PingFang Mono SC
font (see the 3rd image below), as one can see the font do have a regular variant. I don't understand what's happening here and how it affects other faces that don't use this font (notice that "italic" is found in the describe-char
buffer of SF Pro
font in the 1st image).
As you can see the test config below, I do not set any italic related things.
I've tested it in an emacs -q
session.
I don't has this issue with other mono fonts for default
face.
How can I set default
face to use PingFang Mono SC
font but without this unexpected italic issue?
(Notice the "italic" word in the second window, I didn't set it.)
(The font-lock-comment-face
is not set to be italic.)
(Notice the "oblique" word in the second window, I don't know why it is.)
(The information of PingFang Mono SC
font.)
(The information of SF Pro
font.)
(As for comparison, the issue does not happen when using other mono fonts for default
face. As one can see in this case, the default face is set to DM Mono
, but font-lock-comment-face
is normal. Also notice the "normal-normal-normal" part for SF Pro
. Everything is just fine.)
Minimal test config:
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
(when (display-graphic-p)
(set-face-attribute 'default nil :font "PingFang Mono SC")
(custom-set-faces '(font-lock-comment-face ((t (:family "SF Pro"))))))
- The
PingFang Mono SC
font is downloaded from here. - The
SF Pro
font comes with system. - OS: macOS 12.5 (21G72)
- Emacs: GNU Emacs 28.1 (build 1, x86_64-apple-darwin21.5.0, Carbon Version 165 AppKit 2113.5) of 2022-07-04