in Ruby on Rails

Use Google Fonts in Rails Apps

I wanted to use a Google Font for a logo and no where else in the site. It took me a fair amount of googling to figure out something that is relatively simple. One of those annoying problems of syntax differences again. Anyways, this is just a quick post with the answer in case anyone else follows in my footsteps.

In your application.html.erb file put this in between your

This is pretty straightforward. Where FAMILYNAME is goes the name of the font you want to use. I used the h1 tag because I didn’t want this to affect any of the other text on the page. Of course you can adjust the size, color, or whatever else you want to adjust in here as well. Hope this helps someone!

Write a Comment