about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2016-12-12 14:10:33 -0500
committerGitHub <noreply@github.com>2016-12-12 14:10:33 -0500
commit5e425b7b4ba77655032249027f3b2f969d154c48 (patch)
treed0e9c6c449271d22c9c0f2dc0fe2be0aaa5dadf6
parent3bd2c80382422d5d3b24cd5f304584d2d41e7c80 (diff)
parentbee82e88374d5d11746dd456f22ac87a6e492afa (diff)
downloadrust-5e425b7b4ba77655032249027f3b2f969d154c48.tar.gz
rust-5e425b7b4ba77655032249027f3b2f969d154c48.zip
Rollup merge of #38164 - sourcefrog:fonts, r=GuillaumeGomez
Avoid using locally installed Source Code Pro font (fixes #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?
-rw-r--r--src/doc/rust.css4
-rw-r--r--src/librustdoc/html/static/rustdoc.css6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/doc/rust.css b/src/doc/rust.css
index 932594b9912..664bc0fdab0 100644
--- a/src/doc/rust.css
+++ b/src/doc/rust.css
@@ -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) {
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 7ee184c089c..15912b41d59 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -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');
 }
 
 * {