Archived topic
Custom Font not Working
6 replies · Started by Amos on November 25, 2017
Hello. i want to add custom font to load from my server...
i read this article but it is not working.
the name of the font (from google fonts ) "Rubik-Regular"
this it my fonts folder inside the child theme : https://i.imgur.com/i9IKoKV.png
my css file: https://i.imgur.com/k1jZOAi.png
my functions: https://i.imgur.com/dF42rzz.png
my settings: https://i.imgur.com/Z2fT65f.png
what i am doing wrong ? Thank You.
Hi there,
For Google fonts, check this article: https://docs.generatepress.com/article/customizing-the-google-font-list/
Thank leo but this is not what i need.
i want to use the font on my server.
i know how to add more google font to the list - this is not what i need.
"rubik" it just an example it is not working with any font - not only google font.
Hmm, what you have shown looks like it should work.
Can you try inputing the full URL to the font file in your CSS, just to make sure file is being reached?
i try to change it to this:
@font-face {
font-family: 'Rubik-Regular';
src:url('/wp-content/themes/generatepress_child/fonts/rubik-regular.ttf') format('truetype'),
}
but still not working...
Ok i fixed this issue
the problem was :
i change this:
format('truetype'),
to :
format('truetype');
and change this:
fonts/rubik-regular.ttf'
to :
fonts/Rubik-Regular.ttf'
Glad you found the solution!