-
I try to self-hosting 'lato' font rather using google api, I do that :
/* latin-ext */
@font-face {
font-family: 'Lato';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('./themes/myTheme/assets//fonts/lato_italic_400_ext.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: 'Lato';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('./themes/myTheme/fonts/lato_italic_400.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;
}
...
/*******************************
User Global Variables
*******************************/
@importGoogleFonts : false;
/*******************************
Global Overrides
*******************************/
@import (inline) "../assets/latofonts.css";
/* Global */
@site : 'myTheme';
> npx gulp build
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
🤔 This all sounds like the very correct way to do it... i can only think of a typo somewhere |
Beta Was this translation helpful? Give feedback.
-
You may try in your site.overrides |
Beta Was this translation helpful? Give feedback.
-
According to http://lesscss.org/features/#import-atrules-feature-file-extensions your import statement is totally fine, because it ends with @import "foo"; // foo.less is imported
@import "foo.less"; // foo.less is imported
@import "foo.php"; // foo.php imported as a Less file
@import "foo.css"; // statement left in place, as-is But there is
so please try |
Beta Was this translation helpful? Give feedback.
According to http://lesscss.org/features/#import-atrules-feature-file-extensions your import statement is totally fine, because it ends with
css
..But there is
so please try
@import (inline) url('./themes/myTheme/assets/latofonts.css')