Forum Moderators: not2easy

Message Too Old, No Replies

fonts

         

ogletree

5:51 pm on Jan 30, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My website has the code.

@font-face{
src: url(https://example.com/CALIBRI.ttf);
font-family: 'Calibri', sans-serif;
}


I have two problems.

1. I'm getting a warning that says
@font-face declaration does not follow the fontspring bulletproof syntax

2. I'm using a host that does not allow me to upload files because it is a CMS. I'm currently using a CDN to host the .ttf file. Is there a way to get this without me hosting a font file.

not2easy

6:11 pm on Jan 30, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Have you looked into using google fonts? They are commonly used as a remote resource.

robzilla

8:15 pm on Jan 30, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



3. Calibri is not a font you are allowed to embed without having obtained a license.

lucy24

10:54 pm on Jan 30, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



And once you've taken care of the font issue...
I'm using a host that does not allow me to upload files because it is a CMS.

Change hosts. Using a CMS doesn't mean you can't control your own site files.

:: detour to check horse's mouth [w3.org] on question of @font-face format ::

src: url(https://example.com/CALIBRI.ttf);
font-family: 'Calibri', sans-serif;

The quotation marks aren't strictly needed, since it's a single word, but it should do no harm. Is the source really ALL CAPITALS?

Incidentally, in any font source declaration it's thoughtful to start with
local(fontname),
so if users happen to have the font installed, the browser doesn't have to take an extra triip-- especially when it's going to an entirely different server. Fontname is whatever name the computer itself uses on dropdowns and so on, not the complete filename in .ttf or other extension.

tangor

4:00 am on Jan 31, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



@lucy24, agreed, why install/embed a font that already exists on 100s millions of computers?

If special fonts are desired try google or weft (more thoughts on weft: [microsoft.com...] )