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

Unblock font loading in rustdoc.css #72092

Merged
merged 1 commit into from
May 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
font-family: 'Fira Sans';
font-style: normal;
font-weight: 400;
font-display: optional;
src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
}
@font-face {
font-family: 'Fira Sans';
font-style: normal;
font-weight: 500;
font-display: optional;
src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
}

Expand All @@ -17,18 +19,23 @@
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 400;
/* The difference for body text without this font is greater than other fonts,
* so the 0~100ms block of fallback is preferred over optional, for legibility. */
font-display: fallback;
src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff');
}
@font-face {
font-family: 'Source Serif Pro';
font-style: italic;
font-weight: 400;
font-display: optional;
src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff');
}
@font-face {
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 700;
font-display: optional;
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff');
}

Expand All @@ -37,6 +44,7 @@
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
font-display: optional;
/* 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');
Expand All @@ -45,6 +53,7 @@
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 600;
font-display: optional;
src: url("SourceCodePro-Semibold.woff") format('woff');
}

Expand Down