Custom fonts in rails 5 app and Heroku

删除回忆录丶 提交于 2020-01-16 16:26:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!