Reputation: 976
It seems like this can be done... but all the suggestions I've seen online aren't working for me. I have a customFont.ttf tile that I'm putting in this dir: 'home/greg/Documents/MapBox/project/myproject/customFont.ttf'
Then I'm using this code:
Map { font-directory: url(customFont.ttf); }
or
Map { font-directory: url(''); }
or
Map { font-directory: url(fonts/customFont.ttf); }
but nothing is working. I just get en error message such as:
"Invalid value for text-face-name, the type font is expected. comicSansMs, Arial Regular (of type string) was given. (line 71)"
any tips?
Upvotes: 1
Views: 544
Reputation: 980
place your fonts in the folder app/assets/fonts
, lib/assets/fonts or vendor/assets/fonts
If Rails 4+, you can only place your fonts in the folder app/assets/fonts.
In css:
@font-face {
font-family: 'customFont';
src:url('customFont.ttf');
font-weight: normal;
font-style: normal;
}
Upvotes: 0