Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 代码字体先 fallback 到 monospace 再到中文和 sans-serif #1619

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

Henry-ZHR
Copy link
Contributor

现在的情况是在没有 consolas, Menlo, 'PingFang SC', $chinseFont 的系统上(比如一般的 Linux 桌面),会 fallback 到 sans-serif,导致代码块用的全都是正文字体(非等宽)

另外注意到最终 css 中代码块的 font-family 属性包含 !important,这是否是必要的?这样对 Stylus 之类的插件不是很友好

@Henry-ZHR
Copy link
Contributor Author

screenshot

补充更改前效果图 这是你们的 demo 的显示效果

@jerryc127 jerryc127 merged commit 13db106 into jerryc127:dev Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants