Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

How to use .ttf font files in an inherited theme

Started by Lucas Sichardt 2 years ago · 0 replies · 281 views
2 years ago

Hello there,

I've done some trying and some research in this forum but all the things I foun did not work for me.

I have set up a copy of grav including the admin system.
I then created an inherited theme (inherited from Quark) just the minimal way described in the documentation as "manually".

Now I tried to use a custom.css file to begin changing some things. I got it working to set all my text being displayed in red this way so I am sure, my custom.css is being used.

Now I wanted to change the font. I created a font directory in my theme and I try to use the font by using the following in the custom.css:

CSS
@font-face{
    font-family: Ariston; 
    src: url(../fonts/Ariston.ttf);
    }

body {
    font-family: Ariston;
}

I don't know what I am doing wrong. I also tried an additional
'local(Ariston)' before the url etc.

Does anyone have an idea?

Thanks,

Lucas

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 days ago
2 80 2 days ago
General · by Andy Miller, 6 days ago
0 144 6 days ago
General · by Veehem, 1 week ago
0 144 1 week ago
General · by milkboy, 1 week ago
0 138 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago