Archived topic
Can you help adding system font?
4 replies · Started by Silvio on April 10, 2019
Hi,
I followed the guide, but I can't make it working.
I have added this code in the css
/* Metropolis-Regular - latin */
@font-face {
font-family: 'Metropolis';
font-style: normal;
font-weight: 400;
src: url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-Regular.eot'); /* IE9 Compat Modes */
src: local('Metropolis Regular'), local('Metropolis-Regular'),
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-Regular.woff2') format('woff2'), /* Super Modern Browsers */
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-Regular.woff') format('woff'), /* Modern Browsers */
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-Regular.ttf') format('truetype'); /* Safari, Android, iOS */
}
/* Metropolis-RegularItalic - latin */
@font-face {
font-family: 'Metropolis';
font-style: italic;
font-weight: 400;
src: url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-RegularItalic.eot'); /* IE9 Compat Modes */
src: local('Metropolis RegularItalic'), local('Metropolis-RegularItalic'),
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-RegularItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-RegularItalic.woff2') format('woff2'), /* Super Modern Browsers */
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-RegularItalic.woff') format('woff'), /* Modern Browsers */
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/Metropolis-RegularItalic.ttf') format('truetype'); /* Safari, Android, iOS */
}
/* Generated by Font Squirrel (https://www.fontsquirrel.com) on October 7, 2016 */
@font-face {
font-family: 'geomanistregular';
src: url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/geomanist-regular-webfont.eot');
src: url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/geomanist-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/geomanist-regular-webfont.woff2') format('woff2'),
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/geomanist-regular-webfont.woff') format('woff'),
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/geomanist-regular-webfont.ttf') format('truetype'),
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/geomanist-regular-webfont.svg#geomanistregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'metropolisregular';
src: url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/metropolis-regular-webfont.woff2') format('woff2'),
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/metropolis-regular-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proximanova';
src: url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/ProximaNova-Regular.woff2') format('woff2'),
url('https://staging3.silviogulizia.com/wp-content/themes/generatepress_child/fonts/ProximaNova-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
and this in the function
add_filter( 'generate_typography_default_fonts', function( $fonts ) {
$fonts[] = 'Metropolis';
$fonts[] = 'geomanistregular';
$fonts[] = 'metropolisregular';
$fonts[] = 'proximanovaregular ';
return $fonts;
} );
I started with Metropolis, but since it didn't work I tried others.
Now, while geomanist works, all the others don't work. Could you help fix this?
to access website use
user silvio
password g8l1z14
thanks for supporting
Hi there,
Checking out Metropolis and it seems to be working on my end. Did you fix this by chance?
Nope. I did try few things but never worked. Could you share the process you followed and code?
indeed, now it's working. Probably a caching issue on my server, sorry for bothering.
No worries! Glad it's working :)