Skip to content

Commit

Permalink
Rollup merge of rust-lang#38164 - sourcefrog:fonts, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Avoid using locally installed Source Code Pro font (fixes rust-lang#24355).

In some versions of this font the ampersands are drawn badly.

A doc tree built with this change is at https://storage.googleapis.com/mbp-rust-builds/fonts/doc/std/index.html

I'm not seeing this problem locally so I'm not sure this fixes it, but based on the diagnosis in the bug it should.

I've made this a minimal change by only removing the one problematic font but maybe for consistency every font should be read from the Rust docs tree?
  • Loading branch information
frewsxcv authored Dec 12, 2016
2 parents 79a478f + bee82e8 commit 37036aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/doc/rust.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
/* Avoid using locally installed font because bad versions are in circulation:
* see /~https://github.com/rust-lang/rust/issues/24355 */
src: url("SourceCodePro-Regular.woff") format('woff');
}

*:not(body) {
Expand Down
6 changes: 4 additions & 2 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
/* Avoid using locally installed font because bad versions are in circulation:
* see /~https://github.com/rust-lang/rust/issues/24355 */
src: url("SourceCodePro-Regular.woff") format('woff');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 600;
src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff');
src: url("SourceCodePro-Semibold.woff") format('woff');
}

* {
Expand Down

0 comments on commit 37036aa

Please sign in to comment.