css - Adding custom fonts in Rails -


i trying add custom font downloaded in rails app. did: downloaded font (georgia.tff) , put in app/assets/fonts/georgia.tff. main css file looks this:

foundation-and-override.scss

 @font-face {     font-family: "georgia";     src: url(/assets/fonts/georgia.ttf) format("truetype");   }  .header {     font-family: "georgia"; } 

and want apply font:

_header.html.erb

<header class="top-bar" data-topbar role="navigation">   <ul class="title-area">     <li class="header">       <h1><a href="/">smart investors's club</a></h1>   </ul> </header> 

it's not working. i'm using rails 4.2.1. referenced adding custom font in app , official way of adding custom fonts rails 4?. no luck.😋

foundation-and-override.scss

@font-face{ font-family:"georgia"; src:asset-url("georgia.ttf") format("truetype"); }

in application.rb have add:

config.assets.paths << rails.root.join('app', 'assets', 'fonts')

and font file "georgia.ttf" must in app/assets/fonts/georgia.ttf


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -