Make GLCD V3 Font file

This is definitely above my present skill set, but in an effort to learn, I am interested in making a simple font file to use with the GLCD Version 3 library. I have had a look at some of the font header files and feel confident that if I just follow their basic structure, but add my own font data, I can get something working. I cannot work out where these values come from. These are from the Arial 14 header file

Font first char : 32 Font last char : 128 Font used chars : 96

But I think that maybe the “Font used chars “ is just the number of chars in the font data file? Would someone please be able to give me a few clues on these points and I will see how I go.

Thanks Pedro.

Currently there are two types of fonts.
Variable width fonts (where each character can have its own width)
fixed width fonts (where all characters are the same width).

The information you are seeing is from a variable width font and is in a comment.
It is merely informational. It describes the code values of first character the last lastvalue
and how many characters are actually used in the font.
I’d have to go look at the font generation tool to make sure but the reason the have the “used chars”
information is the variable fonts can have “holes” in it.
i.e. not all the characters between the first and last font characters are required to have
glyph definitions.
So when some characters dont’ have definitions, there is a “hole” in the font and the number
of “used chars” between first and last will not be equal to last - first
so that is why there is a “used chars” in the comment.

If you want to play around with creating fonts, I recommend using the glcdfont creator tool.
It is a java gui tool that can create font header files for you from fronts that are installed
on your operating system. It does all the work for you.
You can find information about it in the included html documentation.

If you want create your own by hand you will need to look closer at the actual font data format.
Unfortunately right now there is no real documentation on the data format.
Here is a general overview:
The font data format currently consists of a 6 byte header that describes the font data format.
If the first two bytes are zero it is a fixed font if not it is variable.
The width and height bytes describe the rendered width and height of the font.
(The library uses 1 extra pixel below and to the right of these values for inter character gaps).
The pixel data is stored in the data bytes in the same order as the glcd data pages.
Vertically lsb to msb within each byte.
Then for each 8 pixels it goes from left to right in incrementing data bytes.
So the pixel data is top to bottom per byte and left to right per 8 pixels
then when fonts are taller than 8 pixels, the format continues on the next lower
8 pixels.

— bill

Thanks Bill,

I think that I got the gist of most of that. I did download GLCDFontCreator2, and when I looked in the folder the only file that I could see that might run the program was a MS-DOS batch file but when I double clicked it all I saw was a command window open briefly but nothing else happening. It did not appear that I had Java installed so now that I have installed it the Font tool is now opening. Now I just have to work out how to use it :D Thanks again,