-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rust-lang.org and crate documentation pages require "fira" font #19257
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
Comments
That's very odd, because there are several fallback fonts, including the fallback of fallbacks |
I don't think this is a problem with the fallback. What your first screenshot looks like is what the page looks like in Firefox before the fonts download. What might be useful is the "Network" tab and make sure to do a hard refresh (Ctrl + F5) (Although it might not attempt to download the font at all now you have it installed) |
I agree that the CSS rule seems like it should work fine. I uninstalled "Fira" to troubleshoot this further. You mentioned that the font should be downloaded which made me realize I should check NoScript, but it doesn't show any blocked resources... So just to be extra safe I disabled ALL extensions but I'm still getting invisible text. So here is a screen shot of my "Network" tab with all extensions disabled after a hard refresh: Just to be thorough I tried this from Google Chrome but that displays the page without text as well. I even tried changing my GTK+ and Firefox themes in case it was just inheriting some white text rule from there, but it didn't have any effect. Just incase you want an example of 3rd-party documentation with similar issues here's a screenshot from https://hyperium.github.io/hyper/hyper/index.html with the networking tab open (Note that the SourceSerifPro-Regular font seems to download and display fine): And with the CSS rule mentioning "Fira" disabled: |
This has been a persistent problem in Chrome, I know there were some previous tickets about it. Havne't been able to diagnose a root cause :/ |
The root cause is that simply using the system fonts isn't considered webscale enough for a hip language such as rust. |
Not helpful. |
@steveklabnik do you know if this has been a persistent problem in Firefox as well? Looks like @rnd42 sees it in both Chrome and Firefox. |
I can confirm this problem in Chrome as well as Firefox when I don't have the Fira Sans fonts installed. |
As another data point I don't have any Fira fonts installed on either of my Arch Linux boxes and the font loads and page renders fine for me in both Firefox 31 and Chromium 39. |
@tomjakubowski I was pretty sure it was just Chrome, but I didn't see that someone also reported a Firefox. I use Firefox with basically no fonts installed and it works just fine on Debian Jessie. |
@MatejLach I still believe this has something to do with a corrupted local font install, which the browser doesn't realize is corrupted. I could be wrong, though. |
@steveklabnik I don't know about the corrupted fonts thing, since for me it happens consistently across 2 arch machines and only on rust-lang.org, which would suggest that the problem isn't on my side, although I could not verify it 100%. |
Ahhh interesting. |
That was reported in the OP of this issue 😄 |
Can you specify on which OS (or distro) you are |
@adrientetar On my desktop and laptop I use Arch x64, which isn't saying much since Arch doesn't come with any fonts preinstalled, so I guess simply not having the proper fallback fonts installed is the issue here, since installing Fira Sans resolves it, I guess it's not a big deal in the end, although it is a bit strange that so far rust-lang.org is the only site where I observe this problem (and of course in |
@MatejLach |
@adrientetar Most likely, this is indeed specific to Arch, because I have dozen |
I had a similar problem (July 2014) and solved it. (rust-lang/prev.rust-lang.org/issues/51). I will quote the solution here: "The problem was caused by the font that was already installed on my system as part of google fonts stack, which happens to bear the same name as the font that was supposed to be downloaded from the website. After deleting it from my system all browsers started sending request for the font from the website, which solved the problem." |
Thank you rcx, that's exactly the problem I had. I did the following to fix it: $ mkdir ~/temp remove the Fira fonts installed from the ttf-google-fonts-git package: $ sudo mv /usr/share/fonts/TTF/Fira* ~/temp/ If you installed the Fira font packages via yaourt to fix this you can now uninstall them: $ yaourt -R otf-fira-mono otf-fira-sans and now I can view the site fine. |
We call local fonts first in the CSS. Would removing that call a good thing? Assuming other people affected also run Arch? |
(I still believe that there is a bug which should be reported to Arch maintainers.) |
@adrientetar I would report it, expect that I am not sure which part of the font stack this bug touches. |
I added a comment to a preexisting issue at https://code.google.com/p/googlefontdirectory/issues/detail?id=368 . Thanks for your help. |
This has been documented here rust-lang/rust#19257 (comment) and basically boils down to Google Webfont looking for locally installed versions of Fire Mono first. And this won't be a sensible idea unless you are running Firefox OS which is an edge case at the moment or Arch with a package that contains Fira Mono another edge case.
internal: Cleanup some syntax highlighting things
I've actually had this problem for a while now but just decided to troubleshoot it. So here's what I was initially seeing:
Then i found and disabled a single CSS rule and got this:
I would file this issue with the rust-lang/rust-www repository but then I had the same problem with viewing documentation pages from 3rd-party crates hosted on Github so I'm assuming it's Rust's documentation generator itself that is generating this CSS rule. I have installed the "fira" font from the ArchLinux AUR and no longer have to disable the CSS rule, but there really should be a fall-back font set. In case it's relevant I'm running ArchLinux x86_64, Gnome 3.14.2 and Firefox 33.1.1.
The text was updated successfully, but these errors were encountered: