Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

How to use .ttf font files in an inherited theme

Started by Lucas Sichardt 3 years ago · 0 replies · 345 views
3 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 jeremycherfas, 1 week ago
4 181 2 days ago
General · by lynbor, 6 days ago
2 122 3 days ago
General · by Old Man Umby, 1 week ago
1 100 1 week ago
General · by Sebastian, 1 week ago
1 124 1 week ago
General · by Andy Miller, 3 weeks ago
0 248 3 weeks ago