# Scroll pHAT HD font editor?

**URL:** <https://forums.pimoroni.com/t/scroll-phat-hd-font-editor/4452>\
**Category:** Support\
**Created:** [March 30, 2017, 3:56pm UTC](https://forums.pimoroni.com/t/scroll-phat-hd-font-editor/4452 "2017-03-30T15:56:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thediveo](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/thediveo/32/2226_2.png) [@thediveo](https://forums.pimoroni.com/u/thediveo)\
**Post date:** [March 30, 2017, 3:56pm UTC](https://forums.pimoroni.com/t/scroll-phat-hd-font-editor/4452/1 "2017-03-30T15:56:31Z")

</div>

Is there any tool (besides the obvious vim or emacs) to design a new font for the Scroll pHAT HD?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [March 30, 2017, 4:04pm UTC](https://forums.pimoroni.com/t/scroll-phat-hd-font-editor/4452/2 "2017-03-30T16:04:10Z")

</div>

Any application which can produce a greyscale PNG should suffice. You can then use `mkfont.py` to turn that into a font file:

> <https://github.com/pimoroni/scroll-phat-hd/blob/master/tools/mkfont.py>

Change the values in the top of the script to suit your particular font layout:

```auto
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](https://github.com/pimoroni/scroll-phat-hd/tree/master/library/scrollphathd/fonts)

---

<div class="post-metadata">

**Author:** ![thediveo](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/thediveo/32/2226_2.png) [@thediveo](https://forums.pimoroni.com/u/thediveo)\
**Post date:** [March 30, 2017, 4:06pm UTC](https://forums.pimoroni.com/t/scroll-phat-hd-font-editor/4452/3 "2017-03-30T16:06:21Z")

</div>

Thank you very much for this quick and concise reply! Now that’s a convenient toolchain; so off to the drawing board, erm, Gimp.
