Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

How to use .ttf font files in an inherited theme

Started by Lucas Sichardt 3 years ago · 0 replies · 401 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 Andy Miller, 7 days ago
0 117 7 days ago
General · by lynbor, 1 month ago
3 444 2 weeks ago
General · by lynbor, 3 weeks ago
7 562 2 weeks ago
General · by Harry, 2 weeks ago
0 162 2 weeks ago
General · by Old Man Umby, 1 month ago
2 309 4 weeks ago