Use FontForge — image 1 of 1

circuitpython_selected-glyphs.jpg
details

Optimize File Size

If you take a look at the file size of the .bdf, it's roughly around 900K – That can be a bit larger than needed, especially if you plan to store a lot of image and sound assets. In cases where you need to save on every byte, you can optimize the file size of your fonts by selecting only the characters you want to use. If you scroll through the full list of glyphs, you'll see there's extra special characters – A whole bunch of them! If you don't need them in your project, just select "space" (the glyph just before "!") plus the basic set of upper/lower and alphanumeric characters. You can click + hold and drag to make selections easier. With them selected, go through these steps:

  1. Select the glyphs you want to keep
  2. Use Edit→Select→Invert Selection to change the selection to the unwanted glyphs.
  3. Use Encoding→Detach & Remove Glyphs... to remove the unwanted glyphs. (You'll have to re-load your original font file to undo this step)
  4. Use Element→Regenerate Bitmap to reprocess the glyphs.
  5. Use File→Generate Font to save the reduced version of the file
Back

Search