Reducing .ttf-size ...

morten's picture

Hello,
I have created some really big .ttf-fonts: About 2.2 MB each! The fonts are display/logofonts, with a lot of graphic-effects such as scratches,
holes, etc. Are there any way to reduce the fontsizes? The goal is to make them ready also for webfont usage ...
Thank you for any assistance in this case ;-)
Best, Morten

HVB's picture

There are two possible problems, with different solutions. One is the overall font size which may be a factor in loading time as a webfont, and the other is glyph complexity.

Some older systems, with less computing power or memory, are not able to render over-complex fonts. If your glyph complexity is the result of scanning artifacts with superfluous nodes, etc., the solution is a lot of detail work to clean them up. FontLab's "optimize" function can sometimes help, but its results need to be reviewed.

The effect of the overall font size varies with your audience. Two megabytes over a relativel hi-speed internet connection isn't the worst thing in the world (the font is only downloaded once), but it could be very painful over slower connections. Reducing individual glyph complexity will help, but probably not significantly.

You can reduce the number of glyphs, use 'composed' glyphs (where parts of glyphs refer to parts of other glyphs instead of having separate outlines). This does NOT work for opentype fonts, but it does for TrueType. There are probably some other methods that I'm not aware of.

- Herb

hrant's picture

Here's a trick I used in my Font Aid IV ampersand*: convert everything to straight lines. When you have a fine rough texture the removal of data for curves makes the file smaller without affecting the results much.

* http://www.flickr.com/photos/48413419@N00/4317579688

hhp

Micha Mirck's picture

When using the optime function in FontLab it is a good idea to first copy al the glyphs to the Mask layer. It makes it very clear if glyphs have changed (to much).
And for web you can use other formats than TrueType, so you could start with OpenType CCF and see what filesize you get after conversion. EOT and WOFF will give you a reduced filesize.

@hrant. Very clever but reminds me much of the old converted TrueType's.... brrrr

morten's picture

Thanks, guys, I'll make some try-outs! But: How do you convert to straight lines, Hrant? In FontLab?

hrant's picture

In FontLab: select what you want, right-click and choose Retract BCPs.

hhp

Jens Kutilek's picture

If you have Robofab installed, you can use the FlattenPen or ThresholdPen to reduce outline detail. You can find some example code here: http://www.robofab.org/howto/usepens.html (scroll down to "FlattenPen and flattenGlyph()")

morten's picture

OK, thanks. Well, I have now made a 'golden' solution, where I simply remove some characters + using FL's Optimize-function. That gives me 3 fonts that I now want to convert to .woff. Unfortunenately, I can't use the Online-converters ... are the font-files still too big? (860 KB, 1.1 MB, 721KB, .ttf)??

Karl Stange's picture

You may be able to reduce the file size further by removing unnecessary metadata using a tool such as TTX. Mike Kamermans experimented with this to see how small he could make a TrueType font while still conforming to certain web font standards.

Syndicate content Syndicate content