-
-
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
Bold text not rendering for some fonts at font-weight: 600 e.g. 'Segoe UI' #24305
Comments
I guess it's related to your desktop environment or your font library? |
I guess it's related to I can see that: So could you help to confirm whether other values work? |
Yes, setting it to 900 restores the bolding... desktop-2023-04-24_23.04.01.mp4 |
Well, then it's still related to your font library Your font doesn't render What's the minimal value it could render as bold? (ps: do you know your font's name?) |
MDN has a page for bolding testing (the values in "Try it" could be changed) https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight |
601 !! LOL. Crazy. That does not seem right.
"Segoe UI" according to the CSS "computed" value in Chrome's inspector. |
Maybe we need this PR: Use font-weight: bold instead of 600 #24307 |
OK, looks to be just this font. For some reason it bucks the standards and only renders bold at 601 and higher. I tested at https://developer.mozilla.org/en-US/docs/Web/CSS/font-family by modifying the last font to be 'segoe-ui' to display my font in the list, then I added 'font-weight:600' to all the displayed fonts, and only 'segoe-ui' failed to render in bold. desktop-2023-04-24_23.19.02.mp4 |
Using font-weight:bold does seem safer and less prone to this kind of font edge case, and decouples from the actual underlying font weight. Good example here: https://www.quirksmode.org/css/text/fontweight.html |
https://codepen.io/silverwind/pen/jOeBmvj Here is MacOS: |
Hmm, seems your OS doesn't offer much in terms of bold variation. Such problems are usually Linux-exclusive. |
Then font-weight: 610 seems a reasonable value for most users. |
@belzecue show screenshot of this one please: https://codepen.io/silverwind/pen/jOeBmvj |
Yeah I guess your bold kicks in at > 600, we will use 610. |
Actually we'll go with 601, as you had already indicated that this works for you above. |
Chrome/Chromium has had problems with Segoe-UI before: https://bugs.chromium.org/p/chromium/issues/detail?id=791305&q=component%3ABlink%3EFonts%20bold&can=2 |
I think what you are lacking is a font that supports more fine-grained boldening, likely called variable font. If there's a good one available, it could be considered for our font stack. |
Fix #24305 According to MDN, "bold" starts from 700, some fonts do not provide "bolding" for weight 600 https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
Fix go-gitea#24305 According to MDN, "bold" starts from 700, some fonts do not provide "bolding" for weight 600 https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io> # Conflicts: # web_src/js/components/DashboardRepoList.vue
…, introduce new font weight variables (#24827) There was some recent discussion about this in Discord `ui-design` channel and the conclusion was that #24305 should have fixed their OS font installation to have semibold weights. I have now tested this 601 weight on a Windows 10 machine on Firefox myself, and I immediately noticed that bold was excessivly bold and rendering as 700 because browsers are biased towards bolder fonts. So revert this back to the previous value.
Description
I noticed this in my hosted 1.18.5 instance: bold wiki text was not showing as bold in latest Chrome browser. I went straight to try.gitea.io and reproduced the issue there on the current dev instance. Curiously, this issue does not present with Firefox, which renders the bold as expected, so it seems Chrome is rendering the same CSS differently [EDIT: more likely different fonts, as the Chrome instance was on Linux and the Firefox test was on a windows 10 box].
Video showing my experience:
desktop-2023-04-24_22.36.53.mp4
There seems to be two CSS definitions for STRONG that are related to this issue. When I disable one of them, as shown in the video, bold returns.
Gitea Version
try.gitea.io
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
1.20.0+dev-559-g75c62054a
Operating System
Linux (Debian)
How are you running Gitea?
try.gitea.io
Database
None
The text was updated successfully, but these errors were encountered: