[gi-docgen/none-more-fonts: 3/3] template: Add SourceCodePro




commit 80b985859690d071ea5d638c978fb2a034e74e29
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 ++++--
 gidocgen/templates/basic/SourceCodePro-It.ttf.woff | Bin 0 -> 58444 bytes
 .../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 ++++++++++++++++++++-
 5 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-It.ttf.woff 
b/gidocgen/templates/basic/SourceCodePro-It.ttf.woff
new file mode 100644
index 0000000..8d68f2f
Binary files /dev/null and b/gidocgen/templates/basic/SourceCodePro-It.ttf.woff differ
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 946cee7..ce790e7 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]