How can i use custom fonts?

I'am used Git for upload these eot, svg, ttf, woff files into the assets directory. I tried to access the files with font-face, but there arent present at

How can add and access these files?


asked Oct 18 '13 at 13:39 by SmartStyle 111

I have had no trouble with this method. I created a folder in the assets folder for my fonts then just referenced it with a relative URI in my CSS declarations.

@font-face {
  font-family: 'myfont';
  src: url('/assets/fonts/myfont.eot');
  src: url('/assets/fonts/myfont.eot?#iefix') format('embedded-opentype'),
       url('/assets/fonts/myfont.ttf') format('truetype'),
       url('/assets/fonts/myfont.woff') format('woff'),
       url('/assets/fonts/myfont.svg#myfont') format('svg');

.myfont { font-family: 'myfont' !important; }

Also, don't forget to 'git add' and 'git commit' your files.

answered Oct 22 '13 at 22:58 by tbartels 33719

Your Answer
toggle preview

Follow This Question

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Oct 18 '13 at 13:39

Seen: 2,696 times

Last updated: Oct 22 '13 at 22:58

Established 2004 Handmade in NYC