问题
can you please instruct me on how to add custom fonts to my rails 5 application? i've added my custom fonts files to fonts folder in app/assets. i went on to use the @fontface and font-url in .scss, but my fonts wont take effect after before and[enter image description here pushing to heroku.
enter image description here
回答1:
I suggest you go modify your application.html and add the fonts there. I don't know what you are trying to do but adding a simple
<link href="fonts.googleapis.com/css?family=Roboto"; rel="stylesheet">
In your header might be enough.
来源:https://stackoverflow.com/questions/45335886/custom-fonts-in-rails-5-app-and-heroku