en

PR #5305 Support for defining which charset should be covered by a font

Published At: 2024-12-17 Tags: pr

Now you can manually specify which characters use which fonts.

typ
1
// Only change the font for numbers
2
#set text(font: (
3
(name: "Noto Sans Mono", covers: regex("[0-9]")),
4
"Noto Serif"
5
))
6
Monospace: 110088 \
7
Variable-width: Xyzwls
Monospace: 110088
Variable-width: Xyzwls
typ
1
// Set different fonts for Chinese and English (no need for manual show or re)
2
#set text(font: (
3
(name: "Times New Roman", covers: "latin-in-cjk"),
4
"Noto Sans CJK SC"
5
))
6
Chinese font and Latin Font can be set separately.
Chinese font and Latin Font can be set separately.