about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Spiteri <tspiteri@ieee.org>2021-03-04 15:38:31 +0100
committerTrevor Spiteri <tspiteri@ieee.org>2021-03-07 09:13:27 +0100
commit87d17bb9e8f69b1e7c4a7997f943253db1dda636 (patch)
tree090444fc6e7d3b902d3e9e980d153cf6ba5b3c7c
parent66ec64ccf31883cd2c28d045912a76179c0c6ed2 (diff)
downloadrust-87d17bb9e8f69b1e7c4a7997f943253db1dda636.tar.gz
rust-87d17bb9e8f69b1e7c4a7997f943253db1dda636.zip
Update Source Code Pro and include italics
-rw-r--r--src/librustdoc/html/render/write_shared.rs5
-rw-r--r--src/librustdoc/html/static/COPYRIGHT.txt3
-rw-r--r--src/librustdoc/html/static/SourceCodePro-It.ttf.woffbin0 -> 58444 bytes
-rw-r--r--src/librustdoc/html/static/SourceCodePro-Regular.ttf.woffbin0 -> 68152 bytes
-rw-r--r--src/librustdoc/html/static/SourceCodePro-Regular.woffbin55472 -> 0 bytes
-rw-r--r--src/librustdoc/html/static/SourceCodePro-Semibold.ttf.woffbin0 -> 68080 bytes
-rw-r--r--src/librustdoc/html/static/SourceCodePro-Semibold.woffbin55360 -> 0 bytes
-rw-r--r--src/librustdoc/html/static/rustdoc.css11
-rw-r--r--src/librustdoc/html/static_files.rs12
-rw-r--r--src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt5
10 files changed, 25 insertions, 11 deletions
diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs
index 02ad01aa29a..0270e52897d 100644
--- a/src/librustdoc/html/render/write_shared.rs
+++ b/src/librustdoc/html/render/write_shared.rs
@@ -30,8 +30,9 @@ crate static FILES_UNVERSIONED: Lazy<FxHashMap<&str, &[u8]>> = Lazy::new(|| {
         "SourceSerifPro-Bold.ttf.woff" => static_files::source_serif_pro::BOLD,
         "SourceSerifPro-It.ttf.woff" => static_files::source_serif_pro::ITALIC,
         "SourceSerifPro-LICENSE.md" => static_files::source_serif_pro::LICENSE,
-        "SourceCodePro-Regular.woff" => static_files::source_code_pro::REGULAR,
-        "SourceCodePro-Semibold.woff" => static_files::source_code_pro::SEMIBOLD,
+        "SourceCodePro-Regular.ttf.woff" => static_files::source_code_pro::REGULAR,
+        "SourceCodePro-Semibold.ttf.woff" => static_files::source_code_pro::SEMIBOLD,
+        "SourceCodePro-It.ttf.woff" => static_files::source_code_pro::ITALIC,
         "SourceCodePro-LICENSE.txt" => static_files::source_code_pro::LICENSE,
         "LICENSE-MIT.txt" => static_files::LICENSE_MIT,
         "LICENSE-APACHE.txt" => static_files::LICENSE_APACHE,
diff --git a/src/librustdoc/html/static/COPYRIGHT.txt b/src/librustdoc/html/static/COPYRIGHT.txt
index af77776cca4..24bdca6544d 100644
--- a/src/librustdoc/html/static/COPYRIGHT.txt
+++ b/src/librustdoc/html/static/COPYRIGHT.txt
@@ -23,7 +23,8 @@ included, and carry their own copyright notices and license terms:
     Copyright (c) Nicolas Gallagher and Jonathan Neal.
     Licensed under the MIT license (see LICENSE-MIT.txt).
 
-* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff):
+* Source Code Pro (SourceCodePro-Regular.ttf.woff,
+    SourceCodePro-Semibold.ttf.woff, SourceCodePro-It.ttf.woff):
 
     Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
     with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark
diff --git a/src/librustdoc/html/static/SourceCodePro-It.ttf.woff b/src/librustdoc/html/static/SourceCodePro-It.ttf.woff
new file mode 100644
index 00000000000..8d68f2febdd
--- /dev/null
+++ b/src/librustdoc/html/static/SourceCodePro-It.ttf.woff
Binary files differdiff --git a/src/librustdoc/html/static/SourceCodePro-Regular.ttf.woff b/src/librustdoc/html/static/SourceCodePro-Regular.ttf.woff
new file mode 100644
index 00000000000..7be076e1fca
--- /dev/null
+++ b/src/librustdoc/html/static/SourceCodePro-Regular.ttf.woff
Binary files differdiff --git a/src/librustdoc/html/static/SourceCodePro-Regular.woff b/src/librustdoc/html/static/SourceCodePro-Regular.woff
deleted file mode 100644
index 5576670903a..00000000000
--- a/src/librustdoc/html/static/SourceCodePro-Regular.woff
+++ /dev/null
Binary files differdiff --git a/src/librustdoc/html/static/SourceCodePro-Semibold.ttf.woff b/src/librustdoc/html/static/SourceCodePro-Semibold.ttf.woff
new file mode 100644
index 00000000000..61bc67b8025
--- /dev/null
+++ b/src/librustdoc/html/static/SourceCodePro-Semibold.ttf.woff
Binary files differdiff --git a/src/librustdoc/html/static/SourceCodePro-Semibold.woff b/src/librustdoc/html/static/SourceCodePro-Semibold.woff
deleted file mode 100644
index ca972a11dc4..00000000000
--- a/src/librustdoc/html/static/SourceCodePro-Semibold.woff
+++ /dev/null
Binary files differdiff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 94c231cb33a..b2314ea260a 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -48,14 +48,21 @@
 	font-weight: 400;
 	/* 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');
+	src: url("SourceCodePro-Regular.ttf.woff") format('woff');
+	font-display: swap;
+}
+@font-face {
+	font-family: 'Source Code Pro';
+	font-style: italic;
+	font-weight: 400;
+	src: url("SourceCodePro-It.ttf.woff") format('woff');
 	font-display: swap;
 }
 @font-face {
 	font-family: 'Source Code Pro';
 	font-style: normal;
 	font-weight: 600;
-	src: url("SourceCodePro-Semibold.woff") format('woff');
+	src: url("SourceCodePro-Semibold.ttf.woff") format('woff');
 	font-display: swap;
 }
 
diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs
index 701e106df67..83d4a11e620 100644
--- a/src/librustdoc/html/static_files.rs
+++ b/src/librustdoc/html/static_files.rs
@@ -107,11 +107,15 @@ crate mod source_serif_pro {
 
 /// Files related to the Source Code Pro font.
 crate mod source_code_pro {
-    /// The file `SourceCodePro-Regular.woff`, the Regular variant of the Source Code Pro font.
-    crate static REGULAR: &[u8] = include_bytes!("static/SourceCodePro-Regular.woff");
+    /// The file `SourceCodePro-Regular.ttf.woff`, the Regular variant of the Source Code Pro font.
+    crate static REGULAR: &[u8] = include_bytes!("static/SourceCodePro-Regular.ttf.woff");
 
-    /// The file `SourceCodePro-Semibold.woff`, the Semibold variant of the Source Code Pro font.
-    crate static SEMIBOLD: &[u8] = include_bytes!("static/SourceCodePro-Semibold.woff");
+    /// The file `SourceCodePro-Semibold.ttf.woff`, the Semibold variant of the Source Code Pro
+    /// font.
+    crate static SEMIBOLD: &[u8] = include_bytes!("static/SourceCodePro-Semibold.ttf.woff");
+
+    /// The file `SourceCodePro-It.ttf.woff`, the Italic variant of the Source Code Pro font.
+    crate static ITALIC: &[u8] = include_bytes!("static/SourceCodePro-It.ttf.woff");
 
     /// The file `SourceCodePro-LICENSE.txt`, the license text of the Source Code Pro font.
     crate static LICENSE: &[u8] = include_bytes!("static/SourceCodePro-LICENSE.txt");
diff --git a/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt b/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt
index c5a9bf24381..befbdab0ad9 100644
--- a/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt
+++ b/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt
@@ -6,9 +6,10 @@ FiraSans-Regular.woff
 FiraSans-Regular.woff2
 LICENSE-APACHE.txt
 LICENSE-MIT.txt
+SourceCodePro-It.ttf.woff
 SourceCodePro-LICENSE.txt
-SourceCodePro-Regular.woff
-SourceCodePro-Semibold.woff
+SourceCodePro-Regular.ttf.woff
+SourceCodePro-Semibold.ttf.woff
 SourceSerifPro-Bold.ttf.woff
 SourceSerifPro-It.ttf.woff
 SourceSerifPro-LICENSE.md