• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

Font Generator

pelle2005reg

New member
Hi to all,
i'm looking for a font generator, and i explain what i search so i can be very clear.

This font generator take in input the font and the character dimension (for example "arial 10 "), the height and width in pixel maximum, for example 15 x 16 (2 bytes large and 15 pixel height: the biggest character must stay in this dimension obiously, and in generally are the "W" or the "@"), the way to scan (for example horizontal scan, big endian order), and the alignement (for example on the left).
In output i would like to have a string for each character like this (exadecimal):
( \= comment )

06 , 0E , 01 , \ Width pixels , Height pixels , Width bytes
00 , 00 , \ 0000 0000 0000 0000
78 , 00 , \ 0111 1000 0000 0000
84 , 00 , \ 1000 0100 0000 0000
04 , 00 , \ 0000 0100 0000 0000
04 , 00 , \ 0000 0100 0000 0000
04 , 00 , \ 0000 0100 0000 0000
08 , 00 , \ 0000 1000 0000 0000
10 , 00 , \ 0001 0000 0000 0000
20 , 00 , \ 0010 0000 0000 0000
40 , 00 , \ 0100 0000 0000 0000
FC , 00 , \ 1111 1100 0000 0000
00 , 00 , \ 0000 0000 0000 0000
00 , 00 , \ 0000 0000 0000 0000
00 , 00 , \ 0000 0000 0000 0000
( it is a "2")
If for a moment we think this character formed by 15 4-byte word, we note that there are at least one Most Significant bit set to 1 (this i mean for alignement on the left: all the character must respect this condition).

It is possible to note that viewing the pixel from the height

Where the first three bytes are the effective dimension of the character, and not the maximum dimension fixed in input. This character is large six pixel, but it is composed by 15x2 bytes: all the character converted by the font generator must have a total byte dimension:
(total dimension) = 15 (height) x 2 (large) + 3 (effective dimension info)

This is because my program take in input the character ASCII code that i want to visualize (48 for example, the "0", make the conversion (the font is store in a memory) by the calculation:
(first address of the first character) + (ASCII code) * (total dimension)
searching the position of my stored pixel-by-pixel character is fast so.

But the effective dimension is important because with it i can minimize the time to visualize (if the character is effective large one byte and not two byte, i take the half time) and also i can say what is the next pixel on the display in which i can write the next character. So if i have to write "Line" and i want that the character are equally spaced by one pixel, i can easy made it.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
Top