Closed donneyluck closed 1 year ago
You can set the unicode font to Noto Sans CJK SC
using:
(setq
minemacs-fonts
'(:font-family "Noto Sans CJK SC"
:font-size 13
:unicode-font-family "Noto Sans CJK SC" ;; <-- add this
:variable-pitch-font-family "IBM Plex Serif"
:variable-pitch-font-size 13))
This should solve your issue. However, it will use this font for all other supported Unicode glyphs.
You can set the default font only for CJK glyphs by tweaking unicode-fonts
configuration to use the Noto Sans CJK SC
. However, I don't know how and what font sections you should set. Take a look at the unicode-fonts
repo for more info. See unicode-fonts-block-font-mapping
.
https://github.com/abougouffa/minemacs/blob/main/elisp/%2Bminemacs.el#L82
http://xahlee.info/emacs/emacs/emacs_list_and_set_font.html
Maybe you can refer to xahlee's font setting method
Can be set separately
Font for Unicode Symbols Font for emoji Font for Chinese
https://protesilaos.com/emacs/fontaine here is a package about font
Fontaine lets the user specify presets of font configurations and set them on demand on graphical Emacs frames. The user option fontaine-presets holds all such presets.
The above are just some suggestions to make the font configuration in your frame more clear and simple thks for your time
Can be set separately
Font for Unicode Symbols Font for emoji Font for Chinese
My previous comment talks about this. In my config, I use unicode-fonts
. This package defines a set of fonts to use for the different Unicode blocks (Emoji, Arabic, Hebrew, CJK, ...).
Even if you manage to set the fonts separately outside, unicode-fonts
will override them. Unless you customize the unicode-fonts-block-font-mapping
.
For me, I don't use other languages in my Emacs config, so I'm not interested to implement complex font configuration that I never use!
EDIT: In all cases, you can use a different font setting in your config file (based on fontaine
or other package). If you like to ensure that your custom font settings doesn't gets overridden by MinEmacs' +set-font
, you can hook your custom font config function to minemacs-after-set-fonts-hook
.
ok thanks again
@donneyluck Take a look on my comment edit! It might be useful
i have set minemacs-font to Noto Sans CJK SC but when input chinese not use this font
the font Noto Sans CJK SC is monospaced font