-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Wrong "monospace" font fallback for CJK characters in raw block #3385
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingcjkChinese, Japanese, Korean typography.Chinese, Japanese, Korean typography.textRelated to the text category, which is all about text handling, shaping, etc.Related to the text category, which is all about text handling, shaping, etc.
Description
Description
The following text are rendered wrongly on most Windows. This is because typst usually makes font fallback to "LiSu", an ancient chinese font, or even fails to fallback to any font.
运行结果:
```
请输入一个整数:16
该整数的平方根为: 4.0
```
Though Chinese users already have to style their documents with a template overriding many default settings, I believe it deserves to make our settings more sensible. I suggest to extend this fallback list for different systems:
typst/crates/typst/src/text/raw.rs
Line 434 in 9f69709
| out.set(TextElem::set_font(FontList(vec![FontFamily::new("DejaVu Sans Mono")]))); |
#show raw: set text(font: (
"DejaVu Sans Mono",
"Microsoft YaHei", // for Windows users
"PingFang SC", // for macOS users
"...", // for Linux users
))
Reproduction URL
No response
Operating system
Windows 11
Typst version
- I am using the latest version of Typst
Reference: https://www.tug.org/texlive//Contents/live/texmf-dist/tex/latex/ctex/fontset/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcjkChinese, Japanese, Korean typography.Chinese, Japanese, Korean typography.textRelated to the text category, which is all about text handling, shaping, etc.Related to the text category, which is all about text handling, shaping, etc.