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 mysite.squarespace.com/assets/

How can add and access these files?

Thanks!

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


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 1879

link
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](http://url.com/ "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

Tags:

×251
×12
×10

Asked: Oct 18 '13 at 13:39

Seen: 1,262 times

Last updated: Oct 22 '13 at 22:58

Established 2004 Handmade in NYC