Hello all,
I have some questions about GLCD fonts. Both glcdv3 and openglcd releases contain, among others, these fonts: fixednums7x15, fixednums8x16 and fixednums15x31.
I have a project with KS0108 compatible controller and a 128x64 LCD. Now, I can use these fonts directly and they render perfectly. The problem is that if I create a font of the same size with one of the font creators, they do not render properly. Here's what I've found out:
FontCreator2 (java based):
- for fixednums7x15: to be able to use the generated font, I had to shift the lower 8 bytes 2 bits to the right (if not, this results in a gap of 2 pixels in the middle of the character).
- for a 8x8 font I have already, this creator seemed to create the correct bit patterns
Mikroelektronika Font Creator v1.2 for GLCD:
- for fixednums7x15: the created bit pattern is incorrect. I needed to take every second byte of the created character to make the correct one. So if the created byte order is 0, 1, 2, 3, 4 ... 13 to make it right, the byte order would have to be 0, 2, 4 etc. and after that 1, 3, 5 etc. To confirm this I created the same character with the creator and compared it with the one in fixednums7x15.
- I tried to do the same for fixednums15x31 but couldn't convert it using the same logic.
So the questions are:
- what creator was used to create the fixednums7x15, 8x16 and 15x31 fonts? And how do I create these fonts more easily?
- where can I find OpenGLCD font creator? (or: how do I create new fonts into OpenGLCD?) The documentation mentions it and there is a link to the zip but the link is dead. I think this creator may create the correct characters.
I don't use either GLCDv3 or the OpenGLCD libraries directly, I have my own libraries for KS0108.
Example: bit pattern of the character '1':
// Correct bit pattern for the character 1, size 15x31 (no padding). From fixednums15x31.h.
0x30, 0x30, 0x30, 0x30, 0x3c, 0x3c, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
// From Mikroelektronika font creator, visually created the same character (renders incorrectly):
0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00,
0x30, 0x3C, 0x00, 0x00, 0x30, 0x3C, 0x00, 0x00, 0x30, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF,
0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00,
0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,
// From GLCD fontcreator 2 (java based)
0x30, 0x30, 0x30, 0x30, 0x3C, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFC, 0xFC, 0xFC, 0xFC, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
Any help is greatly appreciated!
