Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

I have a Chinese font file, the size of the file is 7.693 MB. Due to the size of the ttf file, the site loads only slowly. Is there any way to reduce the size of the .ttf font?

Thanks.

share|improve this question
    
There's an identical question on the stackoverflow site. Hopefully this helps. stackoverflow.com/questions/2635423/… –  dinesh Nov 17 '12 at 10:16
add comment

1 Answer

There are a few ways to reduce the size of a TTF file, but most of them require that you know the consequences, since they are lossy.

  • Firstly, you can subset the font, which means to remove any glyphs (character images) that you don't need. If you have a font that covers several languages and you only need to support one language, then this can be for you. Or, if it has a lot of additional symbols and punctuation that you know you're not going to need, this is what you can do.

    There are various services that can do this on a semi-automated basis, the most famous being the fontsquirrel @font-face generator (in expert mode, under custom subsetting). Unfortunately, this doesn't seem to have pre-defined ranges for Chinese characters so this seems like it may not be very easy for you. Or you can do so in your favourite font editor eg. FontForge.

  • Secondly, you can simplify the glyph in the font. Glyphs in a font are vector images, which consist of many line segments with control points where there are curves. You can often remove a lot of vertexes and control points while still somewhat preserving the overall shape. This has the effect of "simplifying" the curves. They lose accuracy, but they also reduce in file size.

  • Thirdly, you can remove some metadata from the font that you know you don't need. Given the font is over 7MB, I highly doubt that metadata is playing much into it here. Also, this is somewhat of an expert option.

  • And lastly, compressing the font using a lossless compression, for example from TTF to WOFF and/or EOT. There are still some browsers out that that don't support WOFF or EOT fonts so you may need to fall back to TTF for those.

It's important that you understand that doing any of the above to the font (apart from the last one) has consequences in how well the font works or how many languages it supports properly, so you need to do a lot of testing.

One final important point is that by doing any of the above to the font (including, surprisingly, simply converting it to WOFF or EOT), you are legally creating a derivative work, for which you specifically need a license to do so from the font's author. Most commercial fonts probably won't let you create derivative works. A notable exception is an open license like the SIL OFL which specifically permits derivative works (if you change the name of the font).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.