Site logo

Archived topic

Local fonts add not work for me

3 replies · Started by Dirk on September 4, 2018

Viewing posts 1–4 of 4

Hello

i have the fonts in childtheme/fonts/ directory

futura_light.eot
futura_light.ttf
futura_light.woff
futura_light.woff2

i have the css in childtheme style.css
___________________________________________________________________________
/* futura_light */
@font-face {
font-family: 'futura_light';
font-style: normal;
font-weight: 400;
src: url('.https://mydomain.de/wp-content/themes/generatepress_child/fonts/futura_light.eot'); /* IE9 Compat Modes */
src: local('futura_light'), local('futura_light'),
url('.https://mydomain.de/wp-content/themes/generatepress_child/fonts/futura_light.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('.https://mydomain.de/wp-content/themes/generatepress_child/fonts/futura_light.woff2') format('woff2'), /* Super Modern Browsers */
url('.https://mydomain.de/wp-content/themes/generatepress_child/fonts/futura_light.woff') format('woff'), /* Modern Browsers */
url('.https://mydomain.de/wp-content/themes/generatepress_child/fonts/futura_light.ttf') format('truetype'), /* Safari, Android, iOS */
url('.https://mydomain.de/wp-content/themes/generatepress_child/fonts/futura_medium.ttf') format('truetype'), /* Safari, Android, iOS */
url('.https://mydomain.de/wp-content/themes/generatepress_child/fonts/futura_bold.ttf') format('truetype'), /* Safari, Android, iOS */
url('.https://mydomain.de/wp-content/themes/generatepress_child/fonts/futura_extra_bold.ttf') format('truetype'), /* Safari, Android, iOS */
}
___________________________________________________________________________

i have the filter in functions.php
___________________________________________________________________________
add_filter( 'generate_typography_default_fonts', 'tu_add_local_fonts' );
function tu_add_local_fonts( $fonts ) {
$fonts[] = 'futura_light';
return $fonts;
}
____________________________________________________________________________

i can select in the customizer "futura_light" :-)

but unfortunately it does not work on the website :-(

yes i followed this instructions,

I found the mistake in this instructions ;-)
__________________________________________________

the path in the css that work is

/ wp-content / themes / generatepress_child / fonts /

with the fullpath

https: // xxxx.de / wp-content / themes / generatepress_child / fonts /

does not work

regards
Dina

Glad you figured out!

This archived topic is closed to new replies.