Skip to content

Instantly share code, notes, and snippets.

@oxguy3
Last active August 9, 2025 23:51
Show Gist options
  • Save oxguy3/c4f2b4743d562a0348a085140a7c4283 to your computer and use it in GitHub Desktop.
Save oxguy3/c4f2b4743d562a0348a085140a7c4283 to your computer and use it in GitHub Desktop.
generate pixelated version of any font

How to make pixelated version of a font

Pre-reqs

You will need:

  • A vector font file (TTF, OTF, whatever -- as long as FontForge supports it)
  • FontForge
  • BitsNPicas (which requires Java)

Steps

  1. Open your TTF (or whatever) in FontForge.
  2. Go to Element->Bitmap Strikes Available.
  3. In the 'Pixel Sizes' field, type the desired pixel size for your font (e.g. 19), then click OK
  4. Go File->Generate Fonts.
  5. We need a BDF file, so select "No Outline Font" on the left, and "BDF" on the right. The number below "BDF" should be the pixel size you specified earlier.
  6. Close FontForge (no need to save).
  7. Run java -jar BitsNPicas.jar convertbitmap -f ttf -o SOMENAME.ttf SOMENAME.bdf
  8. SOMENAME.ttf is now your pixelated font file. TTF isn't the only format BitsNPicas supports, but the other formats are mostly weird ones (no WOFF or OTF).
  9. I'm sure there's an easy way to generate WOFFs from TTFs locally, but I am lazy so cloudconvert.com does the trick.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment