MCU font generator/editor

   This simple program allows you to rasterize any installed font and/or manually edit symbols bit-by-bit. Created font can be saved into special font file (format described later) and exported as asm/C source code that you can use in your projects. Program is able to generate proportional fonts with symbols up to 32x32 pixels.
   Program was developed in BDS2006 Turbo C++ and tested only in M$ Windows XP so I have no idea how this will work in newer OS versions.

This is how it's look like

1 - Settings

   There is no need to configure it but theoretically there could be problem with font rasterization if you are using ClearType or similar font shmooting techinques in you OS. I've disabled that feature programatically but if it's still not working (incomplete/no symbols generated) you can try to disable it manually in your OS.

2 - Usage

2.1 - Font generator

   Main function of this program is to rasterize installed fonts. Selects symbols you want to generate and desired post processing and click "Generete font". Program should display standard font selection dialog where you can choose your font to rasterize.

2.2 - Editor

   If you want to edit some symbol, just select it in list. Height is common for all symbols, width is unique for each symbol. To add some symbol just click into characters list and type name for it (all characters must have unique names). Both font name and symbol names has to be asm/C style compatible. Resulting symbol identifier in genereated source code will be created as: FontName_SymbolName.

2.3 - Source generator

   Program currently supports three source code types. C51 assembler, AVR assembler and C (originally for Keil C51). Program allows to export font in both horizontal and vertical byte format with several options.

Source code exporter settings

   For vertiacal byte organization there are following options (multiple can be selected at once):

Vertical - Default Vertical - Aligh to MSB Vertical - Right side first Vertical - Top side to MSB

   For horizontal byte organization there are following options (multiple can be selected at once):

Horizontal - Default Horizontal - Align to MSB
Horizontal - Bottom side first Horizontal - Right side first

3 - Font file format

   Program saves font project files in special format which is described in following table:

Length Meaning
16B Format identifier "SMfont_generV1.0" or "SMfont_generV2.0"
?B Asm/C style font name (zero terminated)
1B Font height
?B Symbol 0 data
?B Symbol 1 data
... ...
?B Symbol 256 data (blank symbol)

   Originally it was able to store only 8x16 symbols ("SMfont_generV1.0" identifier) but later I needed larger symbols for bigger displays so I've modified program and font format to up to 32x32 pixel symbols ("SMfont_generV2.0" identifier). Format of every symbol data is described in following table:

Length Meaning
?B Asm/C style symbol name (zero terminated)
1B Symbol width
16/32B Column 0 data
16/32B Column 1 data
... ...
16/32B Column 7/31 data

   Because I was a bit lazy, symbol data are stored in byte per pixel format and in fixed size array (always 8x16 or 32x32 bytes). Data are stored by columns, left side first, top pixel first (aligned also top left).

4 - Licence

V1.00 - 6.11.2011: First version.
V1.10 - 17.1.2015: Added vertical symbol offset for Windows font rasterisation. Negative values might be helpful used for large fonts.

5 - License

   It's freeware so you are free to use and redistribute it but only with all included files together (especially with this help) without any modifications! Since it's freeware you are using this at you own risk! Any possible dammage caused by this SW is your problem. If you don't agree with theese terms don't use this SW.

6 - Contact

   In case of some problems with this SW you can contact me at s.maslan@seznam.cz. Additional informations and new versions could be find here: http://www.elektronika.kvalitne.cz/SW/MCU_font_gen/MCU_font_gen.html.

(c) 2011, Stanislav Mašláň - All rights reserved.