views:

16131

answers:

6

Hi all, I'm trying to figure out a decent solution (especially from the SEO side) for embedding fonts in web pages. So far I have see the W3C solution, which doesn't even work on Firefox, and this pretty cool solution. The second solution is for titles only. Is there a solution available for full text? I'm tired of the standard fonts for web pages.

Thanks!

+2  A: 

And it's unlikely too -- EOT is a fairly restrictive format that is supported only by IE. Both Safari 3.1 and Firefox 3.1 (well the current alpha) and possibly Opera 9.6 support true type font (ttf) embedding, and at least Safari supports SVG fonts through the same mechanism. A list apart had a good discussion about this a while back.

olliej
Hey, i was about to post that link, upvote instead.
Kris
+1  A: 

I asked this a while back. The answer is basically that it doesn't work. :(

Marcus Downing
true, thanks for the reference!
Yar
+4  A: 

No, there isn't a decent solution for body type, unless you're willing to cater only to those with bleeding-edge browsers.

Microsoft has WEFT, their own proprietary font-embedding technology, but I haven't heard it talked about in years, and I know no one who uses it.

I get by with sIFR for display type (headlines, titles of blog posts, etc.) and using one of the less-worn-out web-safe fonts for body type (like Trebuchet MS). If you're bored with all the web-safe fonts, you're probably defining the term too narrowly — look at this matrix of stock fonts that ship with major OSes and chances are you'll be able to find a font cascade that will catch nearly all web users.

For instance: font-family: "Lucida Grande", "Verdana", sans-serif is a common font cascade; OS X comes with Lucida Grande, but those with Windows will get Verdana, a web-safe font with letters of similar size and shape to Lucida Grande. Linux users will also get Verdana if they've installed the web-safe fonts package that exists in most distros' package managers, or else they'll fall back to an ordinary sans-serif.

savetheclocktower
Let me also stand on the soapbox for a minute: though I wish Windows had more "good" fonts (OS X has the greatest hits of typography history: Futura, Helvetica, Gill Sans, etc.), it's a good thing that we have to restrain ourselves when picking fonts. Freedom can be used for evil, too.
savetheclocktower
No comment on your comment, but thanks for the answer. That's great. Is there a list of cascades somewhere? Thanks again.
Yar
Here's one list: (http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html). It's conservative, only listing fonts that are identical (or nearly so) across platforms. You might have to do a comparison to see which "safe" font is most like your "risky" font.
savetheclocktower
(Oh, also: always specify a general fallback — sans-serif, serif, or monospace. That way, it'll at least be in the ballpark, should the user have *none* of your requested fonts.)
savetheclocktower
Excellent. Thanks again. Although now that I think about it I can just steal the cascades from sites I like.
Yar
If by bleeding edge you mean Safari 3.1 -- which has been out for 6 or 7 months -- as well as Opera 9.2 (which i believe is when Opera added ttf support), then yes, bleeding edge is an appropriate description, but most people would not consider something to be bleeding edge many months after release
olliej
Most users that come to the sites I work on still use IE6 (those bastards) So from that point of view I consider the latest major versions to be bleeding edge.
Gene
+4  A: 

Try Typeface.js, you convert your .TTF font into a javscript file. Full SEO compatible, supports FF,IE6 and Safari and degrades gracefully on other browsers.

Meixger
Very very cool. I'll be checking this out.
Yar
For those who wonder how it works, it uses the canvas tag (html 5) or VML.
Chris S
I would have to agree with this solution it looks extremely simple and seems to be working on every browser I throw at it.
askon
+28  A: 

Things have changed since this question was originally asked and answered. There's been a large amount of work done on getting cross-browser font embedding for body text to work using @font-face embedding.

Paul Irish put together Bulletproof @font-face syntax combining attempts from multiple other people. If you actually go through the entire article (not just the top) it allows a single @font-face statement to cover IE, Firefox, Safari, Opera, Chrome and possibly others. Basically this can feed out OTF, EOT, SVG and WOFF in ways that don't break anything.

Snipped from his article:

@font-face {
  font-family: 'Graublau Web';
  src: url('GraublauWeb.eot');
  src: local('Graublau Web Regular'), local('Graublau Web'),
    url("GraublauWeb.woff") format("woff"),
    url("GraublauWeb.otf") format("opentype"),
    url("GraublauWeb.svg#grablau") format("svg");
}

Working from that base, Font Squirrel put together a variety of useful tools including the @font-face Generator which allows you to upload a TTF or OTF file and get auto-converted font files for the other types, along with pre-built CSS and a demo HTML page. Font Squirrel also has Hundreds of @font-face kits.

Soma Design also put together the FontFriend Bookmarklet, which redefines fonts on a page on the fly so you can try things out. It includes drag-and-drop @font-face support in FireFox 3.6+.

License Restrictions

Finally, WebFonts.info has put together a nice wiki'd list of Fonts available for @font-face embedding based on licenses. It doesn't claim to be an exhaustive list, but fonts on it should be available (possibly with conditions such as an attribution in the CSS file) for embedding/linking. It's important to read the licenses, because there are some limitations that aren't pushed forward obviously on the font downloads.

fencepost
I think it is worthy to emphasize that you are not automatically allowed to take a font and @font-face-ize it even if you have bought a license of that font legally and for a lot of money. You need to check the font's license for whether that kind of electronic re-distribution is allowed or not. Infringements are so easy to detect and trawl for that there may easily be trouble otherwise, especially if you are a company situated in the right jurisdiction.
Pekka
FontSquirrel makes a clear point of this both on its pre-built font kits and in its generator (which requires you to verify that the fonts are actually licensed for such use). There are other conversion tools out there, but I don't know which ones make a point of discussing licensing.
fencepost
I revised to make this clearer in my response.
fencepost
Fascinating stuff. Out of curiosity, how did you get to this post? There was more than one answer on the same day, and several comments on your answer. +1...
Yar
I don't remember how I ended up on it - search for HTML font perhaps, but I responded because I was working on just this for a client just before Christmas so the information was fresh. I assume Pekka saw it as new activity on an old post; I don't know if the system flags attempts to post multiple links (I know it blocked initially) but I figured it might be a case of "check this to be sure it's not someone spamming".
fencepost
awesome references, thanks!
viatropos
+1  A: 

Check out Typekit, a commercial option (they have a free package available too).

It uses different techniques depending on which browser is being used (@font-face vs. EOT format), and they take care of all the font licensing issues for you also. It supports everything down to IE6.

Here's some more info about how Typekit works:

philfreo