Skip to content

Commit 5e425b7

Browse files
authored
Rollup merge of rust-lang#38164 - sourcefrog:fonts, r=GuillaumeGomez
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?
2 parents 3bd2c80 + bee82e8 commit 5e425b7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/doc/rust.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
font-family: 'Source Code Pro';
4545
font-style: normal;
4646
font-weight: 400;
47-
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
47+
/* Avoid using locally installed font because bad versions are in circulation:
48+
* see https://github.com/rust-lang/rust/issues/24355 */
49+
src: url("SourceCodePro-Regular.woff") format('woff');
4850
}
4951

5052
*:not(body) {

src/librustdoc/html/static/rustdoc.css

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@
5252
font-family: 'Source Code Pro';
5353
font-style: normal;
5454
font-weight: 400;
55-
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
55+
/* Avoid using locally installed font because bad versions are in circulation:
56+
* see https://github.com/rust-lang/rust/issues/24355 */
57+
src: url("SourceCodePro-Regular.woff") format('woff');
5658
}
5759
@font-face {
5860
font-family: 'Source Code Pro';
5961
font-style: normal;
6062
font-weight: 600;
61-
src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff');
63+
src: url("SourceCodePro-Semibold.woff") format('woff');
6264
}
6365

6466
* {

0 commit comments

Comments
 (0)