Is there any tool (besides the obvious vim or emacs) to design a new font for the Scroll pHAT HD?
Any application which can produce a greyscale PNG should suffice. You can then use mkfont.py
to turn that into a font file:
Change the values in the top of the script to suit your particular font layout:
FONT_FILE = "5x7-font.png"
SHEET_WIDTH = 16
SHEET_HEIGHT = 16
FONT_WIDTH = 5
FONT_HEIGHT = 7
CHAR_SPACING_X = 2
CHAR_SPACING_Y = 2
MARGIN_X = 2
MARGIN_Y = 2
CHAR_START = 0x00
CHAR_END = 0xff
Then run mkfont.py > mynewfont.py
Which, if I remember correctly, should produce you a fully functional font file you can dump into: https://github.com/pimoroni/scroll-phat-hd/tree/master/library/scrollphathd/fonts
1 Like
Thank you very much for this quick and concise reply! Now that’s a convenient toolchain; so off to the drawing board, erm, Gimp.