[gi-docgen/none-more-fonts: 2/2] template: Add SourceCodePro
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/none-more-fonts: 2/2] template: Add SourceCodePro
- Date: Wed, 31 Mar 2021 10:43:28 +0000 (UTC)
commit 90df14fc67ec0de3dbd70f1010d1b51f7df36c2c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Mar 31 11:40:04 2021 +0100
template: Add SourceCodePro
Drop the last user of Google Fonts by including SourceCodePro in the
template.
We don't fall back to the installed copy of SourceCodePro because there
have been multiple instances of bad versions being distributed over the
years. See, for instance:
- https://github.com/rust-lang/rust/issues/24355
- https://github.com/rust-lang/mdBook/issues/1304
.reuse/dep5 | 8 ++++--
.../templates/basic/SourceCodePro-Regular.ttf.woff | Bin 0 -> 68152 bytes
.../basic/SourceCodePro-Semibold.ttf.woff | Bin 0 -> 68080 bytes
gidocgen/templates/basic/fonts.css | 31 ++++++++++++++++++++-
4 files changed, 36 insertions(+), 3 deletions(-)
---
diff --git a/.reuse/dep5 b/.reuse/dep5
index 33b5ed9..b5a2327 100644
--- a/.reuse/dep5
+++ b/.reuse/dep5
@@ -7,10 +7,14 @@ Files: gi-docgen.pc.in
Copyright: 2021 GNOME Foundation
License: CC0-1.0
-Files: gidocgen/templates/basic/*.woff
+Files: gidocgen/templates/basic/RedHat*.woff
Copyright: 2019 Red Hat Inc.
License: OFL-1.1
-Files: gidocgen/templates/basic/*.woff2
+Files: gidocgen/templates/basic/RedHat*.woff2
Copyright: 2019 Red Hat Inc.
License: OFL-1.1
+
+Files: gidocgen/templates/basic/SourceCodePro*.woff
+Copyright: 2010, 2012 Adobe Systems Inc.
+License: OFL-1.1
diff --git a/gidocgen/templates/basic/SourceCodePro-Regular.ttf.woff
b/gidocgen/templates/basic/SourceCodePro-Regular.ttf.woff
new file mode 100644
index 0000000..7be076e
Binary files /dev/null and b/gidocgen/templates/basic/SourceCodePro-Regular.ttf.woff differ
diff --git a/gidocgen/templates/basic/SourceCodePro-Semibold.ttf.woff
b/gidocgen/templates/basic/SourceCodePro-Semibold.ttf.woff
new file mode 100644
index 0000000..61bc67b
Binary files /dev/null and b/gidocgen/templates/basic/SourceCodePro-Semibold.ttf.woff differ
diff --git a/gidocgen/templates/basic/fonts.css b/gidocgen/templates/basic/fonts.css
index 6d8873a..59ef1d2 100644
--- a/gidocgen/templates/basic/fonts.css
+++ b/gidocgen/templates/basic/fonts.css
@@ -7,8 +7,10 @@
/**
* RedHat Fonts taken from https://github.com/RedHatOfficial/RedHatFont
* License: SIL Open Font License 1.1 http://scripts.sil.org/OFL
+ *
+ * SourceCodePro Fonts
+ * License: SIL Open Font License 1.1 https://scripts.sil.org/OFL
*/
-@import
url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');
@font-face {
font-family: "Red Hat Display";
@@ -150,3 +152,30 @@
font-weight: 900;
font-display: fallback;
}
+
+/* Do not fall back to locally installed SourceCodePro, as there are
+ * known bad copies being distributed to this day
+ */
+@font-face {
+ font-family: 'Source Code Pro';
+ font-style: normal;
+ font-weight: 400;
+ 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.ttf.woff") format('woff');
+ font-display: swap;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]