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

rustdoc: strange font rendering issue #60365

Closed
ehuss opened this issue Apr 29, 2019 · 4 comments
Closed

rustdoc: strange font rendering issue #60365

ehuss opened this issue Apr 29, 2019 · 4 comments
Assignees
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@ehuss
Copy link
Contributor

ehuss commented Apr 29, 2019

On the recently nightlies, I've noticed that all <code> and <pre> text is being rendered with all black text on Firefox (66.0.3) on macOS only. This is particularly difficult to read with the dark theme.

image

image

Latest nightly Previous Versions
image image

I bisected the change to #60146 (first starting with nightly-2019-04-24). cc @Manishearth

Other browsers and OSs don't seem to be affected. I tried with a brand new firefox profile, and I also tested on multiple macs, all with the same results. Turning off "Source Code Pro" in the CSS inspector fixes the color.

This seems very peculiar, so I was wondering if anyone else can reproduce it.

@Manishearth
Copy link
Member

A quick fix would be to revert the Source Code Pro update, the Source Serif Pro one is the only important one. I'd like to keep our fonts up to date though.

But it looks like either the font or the OS stack is buggy here, and we should investigate that.

(Works fine on Firefox for Android, have no Macs to test)

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 29, 2019
@GuillaumeGomez
Copy link
Member

That is surprising indeed. I can take a look on mac.

@Manishearth
Copy link
Member

Temporary fix: #60382

Centril added a commit to Centril/rust that referenced this issue Apr 30, 2019
…llaumeGomez

Revert "Update Source Code Pro fonts to version 2.030"

Temporary fix for rust-lang#60365

rust-lang#60146 updated all fonts (not just the fonts that were buggy), however it looks like the new Source Code Pro is buggy.

We should test this out of tree: `cargo doc` on anything, replace the font in `target/doc`, and use `python -m SimpleHTTPServer` to see what's going on.

Till we figure that out, I'll just back this out.

r? @GuillaumeGomez

This reverts commit 6bafc58.
Centril added a commit to Centril/rust that referenced this issue Apr 30, 2019
…llaumeGomez

Revert "Update Source Code Pro fonts to version 2.030"

Temporary fix for rust-lang#60365

rust-lang#60146 updated all fonts (not just the fonts that were buggy), however it looks like the new Source Code Pro is buggy.

We should test this out of tree: `cargo doc` on anything, replace the font in `target/doc`, and use `python -m SimpleHTTPServer` to see what's going on.

Till we figure that out, I'll just back this out.

r? @GuillaumeGomez

This reverts commit 6bafc58.
Centril added a commit to Centril/rust that referenced this issue Apr 30, 2019
…llaumeGomez

Revert "Update Source Code Pro fonts to version 2.030"

Temporary fix for rust-lang#60365

rust-lang#60146 updated all fonts (not just the fonts that were buggy), however it looks like the new Source Code Pro is buggy.

We should test this out of tree: `cargo doc` on anything, replace the font in `target/doc`, and use `python -m SimpleHTTPServer` to see what's going on.

Till we figure that out, I'll just back this out.

r? @GuillaumeGomez

This reverts commit 6bafc58.
Centril added a commit to Centril/rust that referenced this issue Apr 30, 2019
…llaumeGomez

Revert "Update Source Code Pro fonts to version 2.030"

Temporary fix for rust-lang#60365

rust-lang#60146 updated all fonts (not just the fonts that were buggy), however it looks like the new Source Code Pro is buggy.

We should test this out of tree: `cargo doc` on anything, replace the font in `target/doc`, and use `python -m SimpleHTTPServer` to see what's going on.

Till we figure that out, I'll just back this out.

r? @GuillaumeGomez

This reverts commit 6bafc58.
@ehuss
Copy link
Contributor Author

ehuss commented May 8, 2019

This seems to be fixed now (thanks!).

This is a known bug in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1520157

Is it worth keeping this issue open? The newer versions of Source Code Pro have a few newer glyphs and updates, but I don't know if there are any improvements that are important at this time.

For details, the version used in rustdoc is 1.017 which has 965 glyphs. The latest version of 2.030 has 1585 glyphs. Google fonts serves 1.017. Adobe's typekit serves 2.010, but with a very small subset of glyphs (393).

I would be inclined to just close this for now. The only alternative I can think of is someone could rebuild the fonts from source, removing the colored/svg glyphs to avoid the firefox issue. Or could wait for it to be fixed in Firefox, but I'm not sure what rustdoc's browser compatibility rules are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants