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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

How to use .ttf font files in an inherited theme

Started by Lucas Sichardt 2 years ago · 0 replies · 202 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 Jerry Hunt, 4 days ago
2 80 9 hours ago
General · by pamtbaau, 14 hours ago
1 51 14 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago