Sfoglia il codice sorgente

Refactored fonts to come from local resources instead of Google Fonts

Jason Crist 3 anni fa
parent
commit
14629ac5b4

BIN
blockbase/assets/fonts/Arvo/Arvo-Bold.woff2


BIN
blockbase/assets/fonts/Arvo/Arvo-BoldItalic.woff2


BIN
blockbase/assets/fonts/Arvo/Arvo-Italic.woff2


BIN
blockbase/assets/fonts/Arvo/Arvo-Regular.woff2


+ 93 - 0
blockbase/assets/fonts/Arvo/OFL.txt

@@ -0,0 +1,93 @@
+Copyright (c) 2010-2013, Anton Koovit (anton@korkork.com), with Reserved Font Name 'Arvo'
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded, 
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.

+ 35 - 0
blockbase/assets/fonts/Arvo/font-face.css

@@ -0,0 +1,35 @@
+/* latin */
+@font-face {
+	font-family: 'Arvo';
+	font-style: italic;
+	font-weight: 400;
+	src: url(./Arvo-Italic.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Arvo';
+	font-style: italic;
+	font-weight: 700;
+	src: url(./Arvo-BoldItalic.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Arvo';
+	font-style: normal;
+	font-weight: 400;
+	src: url(./Arvo-Regular.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Arvo';
+	font-style: normal;
+	font-weight: 700;
+	src: url(./Arvo-Bold.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}

BIN
blockbase/assets/fonts/Cabin/Cabin-Regular-italic.woff2


BIN
blockbase/assets/fonts/Cabin/Cabin-Regular.woff2


BIN
blockbase/assets/fonts/Cabin/Cabin-latin-ext-Regular-italic.woff2


BIN
blockbase/assets/fonts/Cabin/Cabin-latin-ext-Regular.woff2


BIN
blockbase/assets/fonts/Cabin/Cabin-vietnamese-Regular-italic.woff2


BIN
blockbase/assets/fonts/Cabin/Cabin-vietnamese-Regular.woff2


+ 239 - 0
blockbase/assets/fonts/Cabin/font-face-source.css

@@ -0,0 +1,239 @@
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OnhHXisAZFxqZQ.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OngHXisAZFxqZQ.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OnuHXisAZFx.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OnhHXisAZFxqZQ.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OngHXisAZFxqZQ.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OnuHXisAZFx.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OnhHXisAZFxqZQ.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OngHXisAZFxqZQ.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OnuHXisAZFx.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OnhHXisAZFxqZQ.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OngHXisAZFxqZQ.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4g0qWljRw-Pd815fNqc8T_wAFcX-c37OnuHXisAZFx.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6XvptnsF3-OA6Fw.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6Xvp9nsF3-OA6Fw.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6XvqdnsF3-OAw.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6XvptnsF3-OA6Fw.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6Xvp9nsF3-OA6Fw.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6XvqdnsF3-OAw.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6XvptnsF3-OA6Fw.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6Xvp9nsF3-OA6Fw.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6XvqdnsF3-OAw.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6XvptnsF3-OA6Fw.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6Xvp9nsF3-OA6Fw.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(https://fonts.gstatic.com/s/cabin/v24/u-4i0qWljRw-PfU81xCKCpdpbgZJl6XvqdnsF3-OAw.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}

+ 239 - 0
blockbase/assets/fonts/Cabin/font-face.css

@@ -0,0 +1,239 @@
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(./Cabin-vietnamese-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(./Cabin-latin-ext-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(./Cabin-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(./Cabin-vietnamese-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(./Cabin-latin-ext-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(./Cabin-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(./Cabin-vietnamese-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(./Cabin-latin-ext-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(./Cabin-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(./Cabin-vietnamese-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(./Cabin-latin-ext-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: italic;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(./Cabin-Regular-italic.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(./Cabin-vietnamese-Regular.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(./Cabin-latin-ext-Regular.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 400;
+	font-stretch: 100%;
+	src: url(./Cabin-Regular.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(./Cabin-vietnamese-Regular.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(./Cabin-latin-ext-Regular.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 500;
+	font-stretch: 100%;
+	src: url(./Cabin-Regular.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(./Cabin-vietnamese-Regular.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(./Cabin-latin-ext-Regular.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 600;
+	font-stretch: 100%;
+	src: url(./Cabin-Regular.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+/* vietnamese */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(./Cabin-vietnamese-Regular.woff2) format('woff2');
+	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+
+/* latin-ext */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(./Cabin-latin-ext-Regular.woff2) format('woff2');
+	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+/* latin */
+@font-face {
+	font-family: 'Cabin';
+	font-style: normal;
+	font-weight: 700;
+	font-stretch: 100%;
+	src: url(./Cabin-Regular.woff2) format('woff2');
+	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}

+ 66 - 0
blockbase/assets/fonts/scrape.php

@@ -0,0 +1,66 @@
+<?php
+
+$family = $argv[1];
+
+// mkdir( './' . $family );
+
+// file_put_contents(  './' . $family . '/font-face-source.css', fopen( 'https://fonts.googleapis.com/css2?family='.$family.':ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap', 'r' ) );
+
+$contents = file_get_contents( './' . $family . '/font-face-source.css' );
+$modified_contents = $contents;
+$matches;
+$typefaces_to_download = Array();
+
+$weight_conversion = array(
+	'100' => 'Thin',
+	'200' => 'ExtraLight',
+	'300' => 'Light',
+	'400' => 'Regular',
+	'500' => 'Medium',
+	'600' => 'SemiBold',
+	'700' => 'Bold',
+	'800' => 'ExtraBold',
+	'900' => 'Black',
+);
+
+preg_match_all( '/\/\*.*}/sU', $contents, $matches );
+
+foreach( $matches[0] as $match ) {
+
+	preg_match('/(?<=\/\* ).*(?= \*\/)/', $match, $language );
+	if( $language[0] == 'latin' ) {
+		$language = '';
+	} else {
+		$language = '-' . $language[0];
+	}
+
+	preg_match('/(?<=font-style: ).*(?=;)/', $match, $style);
+	preg_match('/(?<=font-weight: ).*(?=;)/', $match, $weight);
+	preg_match('/(?<=src: url\().*?(?=\))/', $match, $url);
+
+	$url = $url[0];
+
+	$weight = '-' . $weight_conversion[$weight[0]];
+
+	if($style[0] == 'normal' ) {
+		$style = '';
+	} else {
+		$style = '-' . $style[0];
+	}
+
+	$new_filename = $family . $language . $weight . $style . '.woff2';
+
+	$modified_contents = str_replace( $url, './' . $new_filename, $modified_contents);
+
+	if ( ! array_key_exists( $url, $typefaces_to_download ) ) {
+		$typefaces_to_download[$url] = './' . $family . '/' . $new_filename;
+	}
+	
+
+}
+
+file_put_contents( './' . $family . '/font-face.css', $modified_contents );
+
+foreach( $typefaces_to_download as $url => $new_typeface_filename ) {
+	file_put_contents(  $new_typeface_filename, fopen($url, 'r' ) );
+}

+ 1 - 1
blockbase/functions.php

@@ -102,7 +102,7 @@ if ( class_exists( 'WP_Theme_JSON_Resolver_Gutenberg' ) ) {
 	require get_template_directory() . '/inc/customizer/wp-customize-colors.php';
 	require get_template_directory() . '/inc/customizer/wp-customize-colors.php';
 	require get_template_directory() . '/inc/customizer/wp-customize-color-palettes.php';
 	require get_template_directory() . '/inc/customizer/wp-customize-color-palettes.php';
 	require get_template_directory() . '/inc/social-navigation.php';
 	require get_template_directory() . '/inc/social-navigation.php';
-	require get_template_directory() . '/inc/custom-google-fonts.php';
+	require get_template_directory() . '/inc/fonts/custom-fonts.php';
 }
 }
 
 
 // Font settings migration and deprecation message. Fonts now set in Global Styles.
 // Font settings migration and deprecation message. Fonts now set in Global Styles.

+ 0 - 130
blockbase/inc/custom-google-fonts.php

@@ -1,130 +0,0 @@
-<?php
-
-// ---------- Custom Fonts ---------- //
-// This code is adapted directly from Jetpack's Google Fonts module, which depends on the Webfonts API from Gutenberg (and eventually Core)
-// https://github.com/Automattic/jetpack/blob/master/projects/plugins/jetpack/modules/google-fonts.php
-const BLOCKBASE_GOOGLE_FONTS_LIST = array(
-	'arvo' => array( 'font_family' => 'Arvo'),
-	'bodoni-moda' => array( 'font_family' => 'Bodoni Moda'),
-	'cabin' => array( 'font_family' => 'Cabin'),
-	'chivo' => array( 'font_family' => 'Chivo'),
-	'courier-prime' => array( 'font_family' => 'Courier Prime'),
-	'dm-sans' => array( 'font_family' => 'DM Sans' ),
-	'domine' => array( 'font_family' => 'Domine'),
-	'eb-garamond' => array( 'font_family' => 'EB Garamond'),
-	'fira-sans' => array( 'font_family' => 'Fira Sans'),
-	'ibm-plex-sans' => array( 'font_family' => 'IBM Plex Sans'),
-	'ibm-plex-mono' => array( 'font_family' => 'IBM Plex Mono'),
-	'inter' => array( 'font_family' => 'Inter'),
-	'josefin-sans' => array( 'font_family' => 'Josefin Sans'),
-	'jost' => array( 'font_family' => 'Jost'),
-	'libre-baskerville' => array( 'font_family' => 'Libre Baskerville'),
-	'libre-franklin' => array( 'font_family' => 'Libre Franklin'),
-	'literata' => array( 'font_family' => 'Literata'),
-	'lora' => array( 'font_family' => 'Lora'),
-	'merriweather' => array( 'font_family' => 'Merriweather'),
-	'montserrat' => array( 'font_family' => 'Montserrat'),
-	'newsreader' => array( 'font_family' => 'Newsreader'),
-	'nunito' => array( 'font_family' => 'Nunito'),
-	'open-sans' => array( 'font_family' => 'Open Sans'),
-	'overpass' => array( 'font_family' => 'Overpass'),
-	'playfair-display' => array( 'font_family' => 'Playfair Display'),
-	'poppins' => array( 'font_family' => 'Poppins'),
-	'raleway' => array( 'font_family' => 'Raleway'),
-	'red-hat-display' => array( 'font_family' => 'Red Hat Display'),
-	'roboto' => array( 'font_family' => 'Roboto'),
-	'roboto-slab' => array( 'font_family' => 'Roboto Slab'),
-	'rubik' => array( 'font_family' => 'Rubik'),
-	'source-sans-pro' => array( 'font_family' => 'Source Sans Pro'),
-	'source-serif-pro' => array( 'font_family' => 'Source Serif Pro'),
-	'space-mono' => array( 'font_family' => 'Space Mono'),
-	'texturina' => array( 'font_family' => 'Texturina'),
-	'work-sans' => array( 'font_family' => 'Work Sans'),
-);
-
-/**
- * Register a curated selection of Google Fonts.
- *
- * @return void
- */
-function blockbase_register_google_fonts() {
-	// Use jetpack's implementation of custom google fonts if it is already active
-	if ( method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'google-fonts' ) ) {
-		return;
-	}
-
-	if ( ! function_exists( 'wp_register_webfont_provider' ) || ! function_exists( 'wp_register_webfonts' ) ) {
-		return;
-	}
-
-	wp_register_webfont_provider( 'blockbase-google-fonts', '\Automattic\Jetpack\Fonts\Google_Fonts_Provider' );
-
-	/**
-	 * Curated list of Google Fonts.
-	 *
-	 * @module google-fonts
-	 *
-	 * @since 10.8
-	 *
-	 * @param array $fonts_to_register Array of Google Font names to register.
-	 */
-	$fonts_to_register = apply_filters( 'blockbase_google_fonts_list', BLOCKBASE_GOOGLE_FONTS_LIST );
-
-	foreach ( $fonts_to_register as $font_settings ) {
-		$font_family = $font_settings['font_family'];
-
-		wp_register_webfonts(
-			array(
-				array(
-					'font-family'  => $font_family,
-					'font-weight'  => '100 900',
-					'font-style'   => 'normal',
-					'font-display' => 'swap',
-					'provider'     => 'blockbase-google-fonts',
-				),
-				array(
-					'font-family'  => $font_family,
-					'font-weight'  => '100 900',
-					'font-style'   => 'italic',
-					'font-display' => 'swap',
-					'provider'     => 'blockbase-google-fonts',
-				),
-			)
-		);
-	}
-
-	add_filter( 'wp_resource_hints', '\Automattic\Jetpack\Fonts\Utils::font_source_resource_hint', 10, 2 );
-	add_filter( 'pre_render_block', '\Automattic\Jetpack\Fonts\Introspectors\Blocks::enqueue_block_fonts', 10, 2 );
-	add_action( 'init', '\Automattic\Jetpack\Fonts\Introspectors\Global_Styles::enqueue_global_styles_fonts' );
-}
-add_action( 'after_setup_theme', 'blockbase_register_google_fonts' );
-
-/**
- * Automatically enqueues default blockbase theme google fonts
- *
- * @return void
- */
-function blockbase_enqueue_default_fonts() {
-	if ( ! function_exists( 'wp_enqueue_webfont' ) ) {
-		return;
-	}
-
-	$font_settings = wp_get_global_settings( array( 'typography', 'fontFamilies' ), 'base' );
-
-	if ( ! isset( $font_settings['theme'] ) ) {
-		return;
-	}
-
-	foreach( $font_settings['theme'] as $font_setting ) {
-		if ( ! isset( $font_setting['fontSlug'] ) ) {
-			continue;
-		}
-
-		$font_slug = $font_setting['fontSlug'];
-
-		if ( $font_slug && isset( BLOCKBASE_GOOGLE_FONTS_LIST[$font_slug] ) ) {
-			$font_family = BLOCKBASE_GOOGLE_FONTS_LIST[$font_slug]['font_family'];
-			wp_enqueue_webfont( $font_family );
-		}
-	}
-}

+ 124 - 0
blockbase/inc/fonts/custom-fonts.php

@@ -0,0 +1,124 @@
+<?php
+
+if ( ! class_exists( '\WP_Webfonts_Provider' ) ) {
+	return;
+}
+
+/**
+ * Blockbase Font Provider
+ */
+class Blockbase_Fonts_Provider extends \WP_Webfonts_Provider {
+
+	/**
+	 * Font provider ID.
+	 *
+	 * @var string
+	 */
+	protected $id = 'blockbase-fonts';
+
+	protected function get_style_css( $family ) {
+		$contents = file_get_contents( get_template_directory() . '/assets/fonts/' . $family . '/font-face.css' );
+		return str_replace( 'src: url(./', 'src: url(' . get_template_directory_uri() . '/assets/fonts/' . $family . '/', $contents );
+	}
+
+	/**
+	 * Gets the `@font-face` CSS styles for Blockbase Fonts.
+	 *
+	 * @return string The `@font-face` CSS.
+	 */
+	public function get_css() {
+		$css  = '';
+
+		foreach ( $this->webfonts as $webfont ) {
+			$css .= $this->get_style_css( $webfont['font-family'] );
+		}
+
+		return $css;
+	}
+
+}
+
+// ---------- Custom Fonts ---------- //
+const BLOCKBASE_FONTS_LIST = array(
+	'arvo' => array( 'font_family' => 'Arvo'),
+	'cabin' => array( 'font_family' => 'Cabin'),
+);
+
+/**
+ * Register a curated selection of Fonts.
+ *
+ * @return void
+ */
+function blockbase_register_fonts() {
+
+	if ( ! function_exists( 'wp_register_webfont_provider' ) || ! function_exists( 'wp_register_webfonts' ) ) {
+		return;
+	}
+
+	$result = wp_register_webfont_provider( 'blockbase-fonts', 'Blockbase_Fonts_Provider' );
+
+	/**
+	 * Curated list of Fonts.
+	 */
+	$fonts_to_register = apply_filters( 'blockbase_fonts_list', BLOCKBASE_FONTS_LIST );
+
+	foreach ( $fonts_to_register as $font_settings ) {
+		$font_family = $font_settings['font_family'];
+
+		wp_register_webfonts(
+			array(
+				array(
+					'font-family'  => $font_family,
+					'font-weight'  => '100 900',
+					'font-style'   => 'normal',
+					'font-display' => 'swap',
+					'provider'     => 'blockbase-fonts',
+				),
+				array(
+					'font-family'  => $font_family,
+					'font-weight'  => '100 900',
+					'font-style'   => 'italic',
+					'font-display' => 'swap',
+					'provider'     => 'blockbase-fonts',
+				),
+			)
+		);
+	}
+
+	//TODO: Could/should this be moved out to here?
+	add_filter( 'pre_render_block', '\Automattic\Jetpack\Fonts\Introspectors\Blocks::enqueue_block_fonts', 10, 2 );
+	add_action( 'init', '\Automattic\Jetpack\Fonts\Introspectors\Global_Styles::enqueue_global_styles_fonts' );
+
+}
+add_action( 'after_setup_theme', 'blockbase_register_fonts' );
+
+/**
+ * Automatically enqueues default blockbase theme fonts
+ * TODO: Shouldn't these font resources be handled in Introspectors\Global_Styles::enqueue_global_styles_fonts? 
+ *
+ * @return void
+ */
+function blockbase_enqueue_default_fonts() {
+	if ( ! function_exists( 'wp_enqueue_webfont' ) ) {
+		return;
+	}
+
+	$font_settings = wp_get_global_settings( array( 'typography', 'fontFamilies' ), 'base' );
+
+	if ( ! isset( $font_settings['theme'] ) ) {
+		return;
+	}
+
+	foreach( $font_settings['theme'] as $font_setting ) {
+		if ( ! isset( $font_setting['fontSlug'] ) ) {
+			continue;
+		}
+
+		$font_slug = $font_setting['fontSlug'];
+
+		if ( $font_slug && isset( BLOCKBASE_FONTS_LIST[$font_slug] ) ) {
+			$font_family = BLOCKBASE_FONTS_LIST[$font_slug]['font_family'];
+			wp_enqueue_webfont( $font_family );
+		}
+	}
+}