Micro-controller sample code, snippets, modules, projects and tools

Home | Projects: LCD Control | Indexing Head | Telescope Control | GPS Reader | Tools: Font Generator


Font Generator for LCD Control project as well as the GLCD library for Arduino.

This tool allows you to upload an image of characters ('!' through to '~' of the ASCII table i.e. 0x21 - 0x7E), of a fixed-width/monospace styling (i.e. Courier New, Fixedsys, Monospace), and it will generate the C header file for that font for both GLCD and LCD Control.

The image you upload may either be of the correct size in pixels (i.e. image width = 94*charWidth x charHeight), or you can choose to upload a larger (or smaller) image and have the tool resize it for you.

For best results you should generate the final sized image yourself prior to upload. If resizing is required these are some of the issues you may find:

Some hints to avoiding and/or solving the above problems:

The easiest way to create an image of characters is:

  1. Open GIMP and create a large new image (i.e. 2000x200)
  2. Choose the text tool, choose your font (i.e. Monospace Bold, size 30), uncheck antialiasing, and enter the text
    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
  3. Delete the Background layer
  4. Choose Image->Fit Canvas to Layers
  5. Choose Image->Flatten Image
  6. Save the image as a GIF
  7. Upload on the below form and specify the width & height. Do NOT use the auto size options for large images like these.

Some sample GIFs:

Keep in mind that the resulting file from a 6x8 font, for example, would actually be 6x7. It appears that this is how GLCD works, leaving the bottom-most line of pixels blank to separate the lines. So all fonts will be reduced by 1 row of pixels.

Potential future features:

Last updated: 2012-08-15

Home | Projects: LCD Control | Indexing Head | Telescope Control | GPS Reader | Tools: Font Generator


Email me