Sweet_Cherry
Sweet_Cherry

Reputation: 333

Using google fonts with rails

I'm using ruby on rails version 5.0.0, and I'm using c9.io. I'm not that sure how to use Google fonts and where I would put the embed font code:

<link href="https://fonts.googleapis.com/css?family=Delius" rel="stylesheet">

I know that I have to put font-family: 'Delius', cursive; in the css file, but if I do that without doing the previous, the only font it uses is Comic Sans.

I learned the answer but I'd still like to know which folder would you put it in?

Upvotes: 0

Views: 962

Answers (2)

Sweet_Cherry
Sweet_Cherry

Reputation: 333

I figured it out. You put <link href="https://fonts.googleapis.com/css?family=Delius" rel="stylesheet"> in the application.html.erb file.

Upvotes: 0

Gage Hendy Ya Boy
Gage Hendy Ya Boy

Reputation: 1564

You can import it wih CSS - Place this at the top of your css file:

@import url('https://fonts.googleapis.com/css?family=Delius');

Upvotes: 1

Related Questions