Creating GLCD fonts


hello all,

i have questions glcd fonts. both glcdv3 , openglcd releases contain, among others, these fonts: fixednums7x15, fixednums8x16 , fixednums15x31.

i have project ks0108 compatible controller , 128x64 lcd. now, can use these fonts directly , render perfectly. problem if create font of same size 1 of font creators, not render properly. here's i've found out:

fontcreator2 (java based):
- fixednums7x15: able use generated font, had shift lower 8 bytes 2 bits right (if not, results in gap of 2 pixels in middle of character).
- 8x8 font have already, creator seemed create correct bit patterns

mikroelektronika font creator v1.2 glcd:
- fixednums7x15: created bit pattern incorrect. needed take every second byte of created character make correct one. if created byte order 0, 1, 2, 3, 4 ... 13 make right, byte order have 0, 2, 4 etc. , after 1, 3, 5 etc. confirm created same character creator , compared 1 in fixednums7x15.
- tried same fixednums15x31 couldn't convert using same logic.

so questions are:
- creator used create fixednums7x15, 8x16 , 15x31 fonts? , how create these fonts more easily?
- can find openglcd font creator? (or: how create new fonts openglcd?) documentation mentions , there link zip link dead. think creator may create correct characters.

i don't use either glcdv3 or openglcd libraries directly, have own libraries ks0108.

example: bit pattern of character '1':

code: [select]

// correct bit pattern character 1, size 15x31 (no padding). 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,

// mikroelektronika font creator, visually created 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,


// 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 appreciated!

apparently, @ point accidentally removed openglcdfontcreator download area.
i have put openglcd download area.
the links in openglcd html documentation openglcdfontcreator should work again.

i'll consider including within release bitmap tools.

keep in mind there different types of fonts.
- fixed width
- fixed width (with no pixel padding)
- variable width pixel padding.

openglcdfontcreator creates fonts using variable width format.

there other tools out there work have used create compatible pixel data.
(it has been several years since have done this)
it can tricky tool create pixel data in needed format , tools incapable of creating
data in needed format.


the issue running way bits stuffed fractional bytes.
fractional bytes bytes contain less 8 bits of pixel data.
i absolutely detest way done, , think bug in thiele's original font creator and/or library.
this goes ks0108 library , has been propagated around , including openglcd.
i had thought fixing (the fix easy) break glcdv3 compatibility
which had high level goal openglcd.

the issue fractional bytes when rendered glyph (not including pixel padding) not exact multiple of 8 pixels.
the valid bits pushed to consider wrong end of byte.
this real pain support, makes code bit larger , slower,
and not way bits stuffed bytes bitmaps. why believe error vs intentional design.

changing fonts map bits same way bitmaps has many advantages,
this keep rendering code same , bitmaps , font glyphs interchangeable.
the disadvantage is not compatible of existing fonts users may have created use earlier libraries.

there many many issues current font format bugs in font tool require several work arounds in library code . someday hope transition away format, though re-writing rendering code correctly render sized character on pixel boundary without frame buffer big task.

--- bill


Arduino Forum > Using Arduino > Displays > Creating GLCD fonts


arduino

Comments

Post a Comment