Reducing truetype font file size for embedded systems

Embedded systems often have limited memory, that can be a challenge when your application requires Asian languages where fonts might be several megabytes large. Below we describe a method to reduce the file size with Fontforge using simhei.ttf, a CJK font as an example.


Fontforge is an open source font editor running under Linux and Windows/Cygwin. For the latest version see

Reducing Font Size

  • Removing Bitmap from Font File.

Some TrueType files embed a bitmap version of the font. When Fontforge opens such a file, it will ask whether to keep the bitmap or not. We can remove the bitmap to reduce the file size.

  • Using a glyphs subset adapted to your application.

We can use Fontforge with cidmap (Fontforge proprietary) and/or Cmap (from adobe) to perform this task. Please check for further information on CJK/CID file for your language.

In our example (simhei.ttf), which can be obtained from Microsoft Windows font directory, if we want to keep the glyphs for simplified Chinese, we can choose to use Adobe-GB1-0. We just need to edit the cidmap Adobe-GB1-4.cidmap in Fontforge directory and keep only lines for CID numbers from 0 to 7716 (This is compatible with GB2318 – Cf paragraph 2 save the file as Adobe-GB1-0.cidmap.  In the top menu in Fontforge, select CID->Convert to CID , then browse to get Adobe-GB1-0.cidmap and click OK.  You should see the following box appear:


Select Delete to remove the extraneous glyphs.

Then on the top menu click on CID->Flatten to return to normal font type.

  • Removing Glyphs Names.

The final step is to remove the Glyphs names which takes a lot of space and are of no use for embedded systems. In the top menu, select File->Generate Fonts, then Options and make sure that PS Glyph Names is unchecked:



    Following the three steps above, we reduce the file size of simhei.ttf from 9.57MB to 1.98MB.
    Further minor size reduction should be possible by using Elements->Font Info. However, some of the options may reduce the font quality.

    Share this:

    Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

    ROCK Pi 4C Plus

    Memfault Embedded Device Reliability Platform
    Notify of
    The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
    Weller PCB manufacturer