Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 841 Bytes

README.md

File metadata and controls

18 lines (16 loc) · 841 Bytes

BitFontMaker

Little python script that converts font's glyph images to a packed array of bits. Makes the process of creating bit fonts a bit easier when working with images. There is an example font included in the example8x5 directory.

Supported conversions

The script supports:

  • C++
  • C
  • Rust
  • You can easily add your own conversions...

Usage

  • Make a directory and put your letter image files in it.
  • The letter images must follow the naming convention: {ascii_code}.{extension}, e.g.: 65.png for the image of letter A.
  • All the images must have identical sizes.
  • Run the script: bitfontmaker.py (You might need to do pip install Pillow first)
  • Specify the source directory containing your letter image files, e.g.: ./example8x5 or an absolute path.
  • Specify the conversion target, e.g.: c for a C array.