I'm trying to get the Playlist font to work on my Rails app. It's showing up on localhost but not on Heroku.
I added a fonts
folder inside my assets
folder, put the PlaylistCaps.otf
and PlaylistScript.otf
files in it, and added this line to my config/application.rb
:
config.assets.paths << Rails.root.join("app","assets","fonts")
I have this in my application.scss
file:
@font-face {
font-family: "PlaylistScript";
src: url(/assets/fonts/PlaylistScript.otf) format("opentype");
}
@font-face {
font-family: "PlaylistCaps";
src: url(/assets/fonts/PlaylistCaps.otf) format("opentype");
}
I've also tried having the source files on S3
and linking that in the src: url()
but to no avail...
I checked to make sure Heroku precompiled my assets on deploy (I don't do it separately).
Can anyone help me figure this out? My live site is currently displaying that awful boilerplate cursive. I've consulted many SO posts (here, here, here) and some gists (like this) but can't find a working solution.
The live site is here if you want to poke around.
Update
I added a google font backup option in my scss
to avoid the cursive default. It still isn't showing the proper font, but at least it doesn't claw your eyes out with ugliness upon pageload:
$font-script: 'PlaylistScript', 'Arizonia', cursive;