-
Notifications
You must be signed in to change notification settings - Fork 981
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
Italic font gets a fallback in Cyrillic texts #8634
Comments
Elsewhere, @pradyunsg has been advocating the use of system fonts, per https://systemfontstack.com.
Would that also help here? |
I guess it likely will, since the local system font would have the relevant glyphs -- although I'll let @webknjaz confirm if that's the case. :) |
Yeah, I think that using system font stack is a good idea regardless. Also, have you considered Also, I've tweaked CSS with body {
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial, sans-serif;
} and DevTools now shows "DejaVu Sans" in Rendered Fonts. It looks consistent with such setup: |
Bonus thoughts: it's probably a good idea to have some e2e tests verifying if the glyphs that get selected for the render are taken from the same font. 🤔 Would something like Puppeteer expose this info? |
@pradyunsg FWIW this looks like a good candidate for "good first issue" and "Hacktoberfest" labels... |
Hi 👋 ! I am looking for a good first issue to get a start in contributing to warehouse. For this issue is the thing to do: (1) fix the fact that italics are displayed using the wrong fallback font or (2) switch warehouse to using the "system font stack" everywhere? |
I think that the system font stack should be used. |
I think using the system font stack is a good idea! systemfontstack.com's font stack isn't perfect for Windows though (it selects Arial over Segoe UI despite the order because... browsers). Here's a font stack that I've spent a lot of time tweaking and testing on Browserstack + asking around for folks to confirm things look right: https://github.com/pradyunsg/furo/blob/ecfee9c5a3872cfac72f5ee8c63c7d474ee8e60f/src/furo/assets/styles/variables/_index.scss#L39 |
I opened a PR which seems to fix this. "Seems" because it feels like there should be more work required :D Looking forward to hear what you have to say. |
@webknjaz, can you confirm? |
@di I haven't checked from the desktop but on mobile (OnePlus 9R/Android/Chrome) it still looks different: (screenshot taken a minute ago) |
@webknjaz Just to clarify, does the italic on mobile (OnePlus 9R/Android/Chrome) look like a different font face, or just a different font size? To me, looks like the italic is rendered with the same Source Sans Pro font face but with a slightly bigger font size. For comparison, this is what it looks like on desktop (macOS 12.3 / Safari 15.4): |
@divbzero I have checked on mobile (OnePlus 9R/Android/Chrome) and couldn't make up my mind if the font was the same, but it definitely looks like it has higher glyphs. |
The 3.x series of Source Sans was released in 2020, and contains the desired italicized glyphs. It was added to Google Fonts in 2021 in google/fonts#3856 The author dropped "Pro" from the name, and replaced with "3". See: https://blog.adobe.com/en/publish/2020/11/30/whats-new-in-source-sans-3 Fixes pypi#8634 Signed-off-by: Mike Fiedler <[email protected]>
Describe the bug
TL;DR normal and bold text gets rendered with "Source Sans Pro" but italics gets some locally-available Arial-based fallback. This makes the paragraph in the example below look inconsistent. I suppose "Source Sans Pro" does not contain any Cyrillic glyphs in italics.
Expected behavior
The same font used for all text content consistently.
To Reproduce
<em>
tag, then go to the "Computed" tab in the sidebar and scroll all the way down to the "Rendered Fonts" section.My Platform
Google Chrome on Gentoo Linux (two of my laptops choose different fonts; because of the present fallbacks one system it is DejaVu Sans and the other it's Arial)
I've also tested it on a Chromebook (ChromeOS is technically Gentoo under the hood but it shouldn't matter) — it uses Arimo.
I'm pretty sure that this behavior will happen on any system that is able to download that main " Source Sans Pro" from the Internet so that it'll get used in some places but not the others.
Additional context
N/A
The text was updated successfully, but these errors were encountered: