Make EOT:s

Goran Soderstrom's picture

How to make an EOT that works?

On Mac OSX.

eigi's picture

Hello,

the eotlitetool from John Daggett works well:

http://people.mozilla.org/~jdaggett/webfonts/eotlitetool.py

... but without MTX compression

Best
Eigi

Goran Soderstrom's picture

Thanks so much.

Excuse me but I’m a bit slow: How do I use it?

eigi's picture

Hello,

It is a command line tool for the terminal.

python eotlitetool.py myFont.ttf
jdaggett's picture

Google has licensed the MTX compression code and included it in their sfntly library. So using that tool will be the best bet, it should run anywhere java is available:

http://code.google.com/p/sfntly/wiki/MicroTypeExpress

Example usage:

sfnttool -e -x source.ttf source.eot

ralf h.'s picture

And if you don't like command line tools, use the @font-face Generator from Fontsquirrel:
http://www.fontsquirrel.com/fontface/generator

It has some great expert settings to do additional corrections.

Goran Soderstrom's picture

Ralf, it doesn't feel that comfortable uploading fonts to FontSquirell, but have done it before and it works great if you want a quick conversion.

John, could you give a hint or two on how to download that thing, so I can make something that I can use in the terminal? It sounds like a great tool.

Thanks, both of you.

jdaggett's picture

I built and ran the tool, it's slightly more complicated than the wiki page implies. The tools are java tools so you'll need to run a Java build step first.

  1. Check out the source
  2. svn checkout http://sfntly.googlecode.com/svn/trunk/ sfntly
  3. Build the tools
  4. cd sfntly/java
    ant

    ... lots of stuff builds ...

  5. Test the build
  6. cd dist/tools/sfnttool
    java -jar sfnttool.jar --help
  7. Build EOT font
  8. java -jar sfnttool.jar -e -x MyFont.ttf MyFont.eot
  9. Build WOFF font
  10. java -jar sfnttool.jar -w MyFont.ttf MyFont.woff

Under OSX 10.6 this was pretty simple, I think all the tools (ant, java) should be available with the default OS install. On Windows, well, good luck and godspeed.

Jack B. Nimblest Jr.'s picture

@jdagget -

is the output font in your example either an eot or a woff? i.e. as you say:

4a! "java -jar sfnttool.jar -e -x MyFont.ttf MyFont.eot"

"Build WOFF font"

4b! "java -jar sfnttool.jar -w MyFont.ttf MyFont.woff"

...or is the code to say (something like):

Wrap EOT in WOFF...

java -jar ?tool.jar -? MyFont.eot MyFont.woff?

Then the browser has to unwrap the woff to find an eot which then gets converted to an sfnt, installed and ready to be rendered?

John Hudson's picture

Wrap EOT in WOFF...

Not possible, I think. The WOFF spec requires the content of a WOFF to be an SFNT. I also can't think of a reason why one would want to put an EOT in a WOFF wrapper, since EOT is primarily of relevance to versions of IE that don't support WOFF.

Goran Soderstrom's picture

John! It works. Great. Thanks so much for the pedagogic instruction. I’ve never been friends with the terminal so I really needed it.

Jack B. Nimblest Jr.'s picture

@Hudson - "WOFF spec requires the content of a WOFF to be an SFNT."

Doesn't OT require an sfnt? Or does The OT in EOT stand for something else, as does the E?

"...I also can't think of a reason why one would want to put an EOT in a WOFF wrapper,"

Isn't WOFF the STD web font form we are s'posed to be uniformly supporting, 'till deaf do us part? Doesn't wrapping an EOT as a WOFF make it even smaller?

"... since EOT is primarily of relevance to versions of IE that don't support WOFF."

Are there even such browsers/unupgraded IE users on the Mac?

How to explain this mess to an audience of web developers... Vlad maybe should do it.

Té Rowan's picture

Won't work. EOT uses a proprietary, patented compression schema that just about nobody else uses. WOFF uses deflation like PKZIP, WinZip and InfoZip.

Khaled Hosny's picture

Doesn't wrapping an EOT as a WOFF make it even smaller?

Compressing an already compressed file is unlikely to make it any smaller.

Also wrapping an already wrapped SFNT font does not make much sense, but since MTX compression is now available under a “friendlier” license, it would make sense for WOFF to (optionally?) use it as it gives better font compression over plain gzip that is currently in use.

k.l.'s picture

On the other hand, gzip is common and there are libraries for many languages, so better stick to it. One downside of OT is that it offers many options in terms of some tables' formats which in turn means that supporting them is some work. And we are talking about a difference of a few KBs. I like the straightforwardness of WOFF, compared to the options that different EOT versions imply. If file size really matters, disallow webfonts (I do).

Frode Bo Helland's picture

Someone should come up with a diet for webfonts.

jdaggett's picture

@dberlow

Right, you can build either an EOT or a WOFF font with sfnttool but the input is always a ttf.

Packaging an EOT font in a WOFF container doesn't work, the formats are different. EOT uses Monotype's MTX compression which does things like pull the hints out from the glyph data and reinserts them in the decompression phase. Keeping the hints together before applying entropy compression helps to reduce their size a bit compared to just gzip'ing a font, but how much will obviously depend on the structure of the hinting data.

John Hudson's picture

As John D said.

David, the input for a WOFF file is pretty strictly defined in the WOFF spec. It must be a well-formed sfnt that can be losslessly, table-by-table compressed and expanded into and from the WOFF package. And EOT is another packaging format. Yes, it also contains an sfnt, but its own packaging means that it is not a valid input for a WOFF file.

Are there even such browsers/unupgraded IE users on the Mac?

I sure as heck hope not. Microsoft ceased development of IE for Mac in 2003, when Apple launched Safari and didn't renew their bundling agreement with MS. Did IE for Mac support EOT? I don't remember.

Vlad Levantovsky's picture

@jdaggett
Thank you John for posting a detailed explanation on the use of sfntly tools and for clarifying the EOT / WOFF differences

@dberlow
You're right, OT does follow the SFNT structure, EOT is not. It has its own header followed by either raw TTF/OT data (as in EOT-Lite), or by MTX-compressed font data. Either one would not be considered a compliant input for WOFF converter, and it doesn't make sense to wrap one webfont format into another.

WOFF is the standard format that pretty much all new browsers support. EOT is only relevant for older IE versions (up to and including IE8) that can only read EOT files. I don't think there is much concern about "unupgraded IE users on Mac", but there are still plenty of users using IE8 on WinXP - you need EOT if you don't want to ignore them (and sfntly tools from Google now allow everyone to do it easily).

@Khaled
MTX is now available under free for all license - I don't think it can get any "friendlier" than that :)
And I agree, it does make perfect sense for web fonts to use better compression technology whenever available, especially if the benefits of doing so outweight the implementation costs.

dezcom's picture

Gee, wish there was a plain brown wrapper ;-)

Richard Fink's picture

The patent for MTX expires in 2017, five years, anyway. After which licensing is a moot issue.
The need to make and use EOT formatted fonts, if the past is any guide, will not be moot.

(BTW - if created within a licensed installation of Windows, there are not and never were any licensing issues with using MTX - patent exhaustion would certainly apply. To explain: the components in an average automobile involve dozens of patents yet when you buy a car you, the consumer, don't need to license these independently. That's "patent exhaustion" at work. The only license you need is a license to drive.)

For any Mac users who are running Windows in a virtual machine there's EOTFAST for making compressed EOT files.

Happy that Monotype is being clear and up-front on the subject. I wasn't aware a new policy had been posted.

Té Rowan's picture

@dezcom – Keep that wrapper for when you want folk to think you're sneaking about with something more exciting than Helv or TNR.

dezcom's picture

Oh, you mean like XXX :-)

Té Rowan's picture

Or maybe some of that Fourecks beer. I'm sure Hrant wouldn't mind an oilcan to toast the new Unicode addition.

Jack B. Nimblest Jr.'s picture

vlad: "...it doesn't make sense to wrap one webfont format into another."

Is that a joke? or do you not believe .ttf is a webfont format? or is WOFF not a wrapping? or has sense been working grouped out of you? ;)

There could be a lot more to say, but the continuing cascade of Window's tragedies, like rendering, font families bigger than 4 styles, legacy browsers and OT near-compliance, is better off left for people now in their teens to face upon maturity.

Goran Soderstrom's picture

For any Mac users who are running Windows in a virtual machine there's EOTFAST for making compressed EOT files.

Richard, that app sometimes makes eot:s that doesn't work. I tried several times. It doesn't say why either. The fonts just doesn't load in browsers.

This sfntly works like a dream.

Vlad Levantovsky's picture

@dberlow

Is that a joke? or do you not believe .ttf is a webfont format?
No, I don't. I consider .ttf being as much of a webfont format as the screw being used as a nail. In absense of a screwdriver I can drive the screw in using a hammer, but it doesn't make it a nail.

There could be a lot more to say ...
I'd rather not :)

Richard Fink's picture

>Richard, that app sometimes makes eot:s that doesn't work. I tried several times.
>It doesn't say why either. The fonts just doesn't load in browsers.

Unfortunately this CAN happen because the app doesn't check for compliance with the rules for making a valid EOT.
If sfntly is making a working font and EOTFAST is not, then sfntly is changing the font to conform.
Read the documentation for EOTFAST for the rules. tThere's only a couple of things that can go wrong - usually the construction of the names in the naming table.
If you have any problems, feel free to contact me - it will only take a second to show you where the problem is.

Goran Soderstrom's picture

Richard, those rules looks just silly ;-) EOT should just be a wrapper, nothing else. I don't want it to mess with my fonts.

Jack B. Nimblest Jr.'s picture

@Vlad: "No, I don't. I consider .ttf being as much of a webfont format as the screw..."

The screw? I want developers to be able to simply nail web fonts and you want to complexly screw web fonts?

lol, from here, "WOFF is not expected to replace other formats such as TrueType/OpenType/Open Font Format or SVG fonts, but provides an alternative."

So... if TT and OT formats are standard, and WOFF "provides an alternative", what planet are you on?!

Also, note! on the same web page referenced above, that there is not a single WOFF "Benefit" listed that was not already a benefit of .ttf .otf or .cff fonts.

Nice try, but without listing the extensible metadata and "garden fence" there's nothing to say for it. This makes a thinking one cogitate on the possible benefit list of EOT. :o

Khaled Hosny's picture

... but without listing the extensible metadata and "garden fence" there's nothing to say for it.

I've always thought those are the benefits of WOFF (and the compression, though any decent web server can be configured to compress any content, any way). I've never seen anyone else suggesting other benefits (not that I really care about WOFF, though I like the convenience of compressing fonts and not having to fiddle with sever configuration).

Syndicate content Syndicate content