Skip to content

Commit ea9519b

Browse files
committed
Update Source Code Pro and include italics
1 parent b7a9c28 commit ea9519b

9 files changed

+22
-9
lines changed

src/librustdoc/html/render.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -700,10 +700,12 @@ themePicker.onblur = handleThemeButtonsBlur;
700700
static_files::source_serif_pro::ITALIC)?;
701701
write(cx.dst.join("SourceSerifPro-LICENSE.md"),
702702
static_files::source_serif_pro::LICENSE)?;
703-
write(cx.dst.join("SourceCodePro-Regular.woff"),
703+
write(cx.dst.join("SourceCodePro-Regular.ttf.woff"),
704704
static_files::source_code_pro::REGULAR)?;
705-
write(cx.dst.join("SourceCodePro-Semibold.woff"),
705+
write(cx.dst.join("SourceCodePro-Semibold.ttf.woff"),
706706
static_files::source_code_pro::SEMIBOLD)?;
707+
write(cx.dst.join("SourceCodePro-It.ttf.woff"),
708+
static_files::source_code_pro::ITALIC)?;
707709
write(cx.dst.join("SourceCodePro-LICENSE.txt"),
708710
static_files::source_code_pro::LICENSE)?;
709711
write(cx.dst.join("LICENSE-MIT.txt"),

src/librustdoc/html/static/COPYRIGHT.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ included, and carry their own copyright notices and license terms:
2323
Copyright (c) Nicolas Gallagher and Jonathan Neal.
2424
Licensed under the MIT license (see LICENSE-MIT.txt).
2525

26-
* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff):
26+
* Source Code Pro (SourceCodePro-Regular.ttf.woff,
27+
SourceCodePro-Semibold.ttf.woff, SourceCodePro-It.ttf.woff):
2728

2829
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
2930
with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/librustdoc/html/static/rustdoc.css

+8-2
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@
3939
font-weight: 400;
4040
/* Avoid using locally installed font because bad versions are in circulation:
4141
* see https://github.com/rust-lang/rust/issues/24355 */
42-
src: url("SourceCodePro-Regular.woff") format('woff');
42+
src: url("SourceCodePro-Regular.ttf.woff") format('woff');
43+
}
44+
@font-face {
45+
font-family: 'Source Code Pro';
46+
font-style: italic;
47+
font-weight: 400;
48+
src: url("SourceCodePro-It.ttf.woff") format('woff');
4349
}
4450
@font-face {
4551
font-family: 'Source Code Pro';
4652
font-style: normal;
4753
font-weight: 600;
48-
src: url("SourceCodePro-Semibold.woff") format('woff');
54+
src: url("SourceCodePro-Semibold.ttf.woff") format('woff');
4955
}
5056

5157
* {

src/librustdoc/html/static_files.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,15 @@ pub mod source_serif_pro {
9696

9797
/// Files related to the Source Code Pro font.
9898
pub mod source_code_pro {
99-
/// The file `SourceCodePro-Regular.woff`, the Regular variant of the Source Code Pro font.
100-
pub static REGULAR: &'static [u8] = include_bytes!("static/SourceCodePro-Regular.woff");
99+
/// The file `SourceCodePro-Regular.ttf.woff`, the Regular variant of the Source Code Pro font.
100+
pub static REGULAR: &'static [u8] = include_bytes!("static/SourceCodePro-Regular.ttf.woff");
101101

102-
/// The file `SourceCodePro-Semibold.woff`, the Semibold variant of the Source Code Pro font.
103-
pub static SEMIBOLD: &'static [u8] = include_bytes!("static/SourceCodePro-Semibold.woff");
102+
/// The file `SourceCodePro-Semibold.ttf.woff`, the Semibold variant of the Source Code Pro
103+
/// font.
104+
pub static SEMIBOLD: &'static [u8] = include_bytes!("static/SourceCodePro-Semibold.ttf.woff");
105+
106+
/// The file `SourceCodePro-It.ttf.woff`, the Italic variant of the Source Code Pro font.
107+
pub static ITALIC: &'static [u8] = include_bytes!("static/SourceCodePro-It.ttf.woff");
104108

105109
/// The file `SourceCodePro-LICENSE.txt`, the license text of the Source Code Pro font.
106110
pub static LICENSE: &'static [u8] = include_bytes!("static/SourceCodePro-LICENSE.txt");

0 commit comments

Comments
 (0)