-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
SF Mono/SFMono-Regular displays Menlo font, use ui-monospace instead #22125
Comments
This looks like a change we could try. I don't understand the details but https://qwtel.com/posts/software/the-monospaced-system-ui-css-font-stack/ mentions |
@silverwind thank you for following up correct (re: " |
Enabling this for mac users would be cool- I actually install SFMono on my Ubuntu machines too. |
edited visual examples to help make the issue clearer :) (issue is still present in Gitea 1.91.0+) |
According to https://caniuse.com/extended-system-fonts, Try #24442 which does just that. |
Actually I've removed |
But there are other OS and browsers ... not sure whether we haven enough confidence to remove some mono fonts. |
Yeah it's a complicated topic. For now I've changed #24442 back to additions only. But eventually we have to remove some legacy fonts, the list can't be seen as append-only 😆. |
- Add `ui-monospace` to support Safari 13.4+. - Add `SF Mono` variant to support the font on non-mac. - Quote fonts as per [W3C recommendation](https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#propdef-font-family). > it is recommended to quote font family names that contain white space, digits, or punctuation characters other than hyphens Fixes: #22125
@silverwind thanks again for following up |
Description
Change in index.css:
--fonts-monospace: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace, var(--fonts-emoji);
To:
--fonts-monospace: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace, var(--fonts-emoji);
At least for me, Gitea/Safari cannot find SF Mono or SFMono-Regular, unless I replace either one with ui-monospace.
See visual examples (below).
Also,I reproduced the bug in https://try.gitea.io/huihuiyule/spring-cloud-alibaba under "Add maven dependency."(For now, I
docustomize the default theme with:root { --fonts-monospace: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace, var(--fonts-emoji) !important; }
.)Screenshots
Visual examples: (edited!)
(Default)
(Changed)
Gitea Version
1.17.3
Can you reproduce the bug on the Gitea demo site?
Yes
Operating System
macOS Ventura 13.0.1
Browser Version
Safari Version 16.1
The text was updated successfully, but these errors were encountered: