Hi all
I tried to generate a font.
Here i need to have fixed size font because it's hard to control "intelligent" positionning for text .
GLCD give me the coding but it don't give pre-codes , like existing fonts (bytes by char, pixels H, pixels V... and others so I can't use the produced font.
is there any solution for this ?
thanks for help
Is it possible to create a new font size for IL9341 ?
-
- Posts: 240
- Joined: 16 Jan 2010 22:26
- dejan.odabasic
- mikroElektronika team
- Posts: 2649
- Joined: 30 Apr 2012 14:20
Re: Is it possible to create a new font size for IL9341 ?
Hello,
Have you used 'Export for TFT and new GLCD' option?
This option in GLCD Font Creator generates the font table which is compatible with TFT library functions (TFT_Set_Font).
Best regards.
Have you used 'Export for TFT and new GLCD' option?
This option in GLCD Font Creator generates the font table which is compatible with TFT library functions (TFT_Set_Font).
Best regards.
-
- Posts: 240
- Joined: 16 Jan 2010 22:26
Re: Is it possible to create a new font size for IL9341 ?
I used "Export for MikroElektronika Compilers'
For MikroC , this give the following complete code ( here I want to have a courrier fixed size font)
This code directly start but space char code (32)
if I put this code -witch use different size than already existing font codes- it doesn't work.
Of course: there is no information about following char informations !
following code show the difference between codes: here, with already working font, you have many (red color) lines before real chars individual declaration witch is different from code generated by GLCD.
Probably I didn't understand something but I can't see any other option in GLCD font creator for this
------------------
const code char Arial21x24_Bold[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x18,
0x00,
0x01,0x88,0x01,0x00,
0x05,0xA0,0x01,0x00,
0x09,0xB8,0x01,0x00,
0x0C,0xE8,0x01,0x00,
0x0B,0x18,0x02,0x00,
0x10,0x48,0x02,0x00,
0x0F,0x78,0x02,0x00,
0x04,0xA8,0x02,0x00,
0x06,0xC0,0x02,0x00,
0x06,0xD8,0x02,0x00,
0x08,0xF0,0x02,0x00,
0x0C,0x08,0x03,0x00,
0x04,0x38,0x03,0x00,
0x07,0x50,0x03,0x00,
0x04,0x68,0x03,0x00,
0x06,0x80,0x03,0x00,
0x0B,0x98,0x03,0x00,
0x09,0xC8,0x03,0x00,
0x0B,0xF8,0x03,0x00,
0x0B,0x28,0x04,0x00,
0x0B,0x58,0x04,0x00,
0x0B,0x88,0x04,0x00,
0x0B,0xB8,0x04,0x00,
0x0B,0xE8,0x04,0x00,
0x0B,0x18,0x05,0x00,
0x0B,0x48,0x05,0x00,
0x05,0x78,0x05,0x00,
0x05,0x90,0x05,0x00,
0x0B,0xA8,0x05,0x00,
0x0B,0xD8,0x05,0x00,
0x0B,0x08,0x06,0x00,
0x0C,0x38,0x06,0x00,
0x14,0x68,0x06,0x00,
0x0F,0xB0,0x06,0x00,
0x0E,0xE0,0x06,0x00,
0x0E,0x10,0x07,0x00,
0x0E,0x40,0x07,0x00,
0x0D,0x70,0x07,0x00,
0x0C,0xA0,0x07,0x00,
0x0F,0xD0,0x07,0x00,
0x0D,0x00,0x08,0x00,
0x04,0x30,0x08,0x00,
0x0A,0x48,0x08,0x00,
0x0E,0x78,0x08,0x00,
0x0C,0xA8,0x08,0x00,
0x10,0xD8,0x08,0x00,
0x0D,0x08,0x09,0x00,
0x0F,0x38,0x09,0x00,
0x0D,0x68,0x09,0x00,
0x10,0x98,0x09,0x00,
0x0E,0xC8,0x09,0x00,
0x0D,0xF8,0x09,0x00,
0x0C,0x28,0x0A,0x00,
0x0D,0x58,0x0A,0x00,
0x0D,0x88,0x0A,0x00,
0x15,0xB8,0x0A,0x00,
0x0D,0x00,0x0B,0x00,
0x0D,0x30,0x0B,0x00,
0x0C,0x60,0x0B,0x00,
0x07,0x90,0x0B,0x00,
0x06,0xA8,0x0B,0x00,
0x05,0xC0,0x0B,0x00,
0x0B,0xD8,0x0B,0x00,
0x0C,0x08,0x0C,0x00,
0x04,0x38,0x0C,0x00,
0x0C,0x50,0x0C,0x00,
0x0C,0x80,0x0C,0x00,
0x0B,0xB0,0x0C,0x00,
0x0C,0xE0,0x0C,0x00,
0x0B,0x10,0x0D,0x00,
0x08,0x40,0x0D,0x00,
0x0C,0x58,0x0D,0x00,
0x0C,0x88,0x0D,0x00,
0x04,0xB8,0x0D,0x00,
0x04,0xD0,0x0D,0x00,
0x0B,0xE8,0x0D,0x00,
0x04,0x18,0x0E,0x00,
0x12,0x30,0x0E,0x00,
0x0C,0x78,0x0E,0x00,
0x0C,0xA8,0x0E,0x00,
0x0C,0xD8,0x0E,0x00,
0x0C,0x08,0x0F,0x00,
0x08,0x38,0x0F,0x00,
0x0B,0x50,0x0F,0x00,
0x06,0x80,0x0F,0x00,
0x0C,0x98,0x0F,0x00,
0x0C,0xC8,0x0F,0x00,
0x0F,0xF8,0x0F,0x00,
0x0B,0x28,0x10,0x00,
0x0B,0x58,0x10,0x00,
0x0A,0x88,0x10,0x00,
0x08,0xB8,0x10,0x00,
0x04,0xD0,0x10,0x00,
0x07,0xE8,0x10,0x00,
0x0B,0x00,0x11,0x00,
0x0E,0x30,0x11,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x08,0x08,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x
------------------
For MikroC , this give the following complete code ( here I want to have a courrier fixed size font)
This code directly start but space char code (32)
Code: Select all
//http://www.mikroe.com
//GLCD FontName : [b]Courier_New7x11[/b]
//GLCD FontSize : 7 x 11
const unsigned short Courier_New7x11[] = {
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char
0x04, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x00, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char !
0x05, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char "
0x07, 0x28, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x28, 0x00, 0xFF, 0x01, 0xFF, 0x01, 0x28, 0x00, // Code for char #
0x06, 0x00, 0x00, 0xCC, 0x00, 0x9E, 0x00, 0x93, 0x03, 0xF2, 0x00, 0x66, 0x00, 0x00, 0x00, // Code for char $
0x07, 0x0C, 0x00, 0x32, 0x00, 0x12, 0x00, 0x7C, 0x00, 0x90, 0x00, 0x98, 0x00, 0x60, 0x00, // Code for char %
0x06, 0x70, 0x00, 0x9C, 0x00, 0xBE, 0x00, 0xE2, 0x00, 0xF2, 0x00, 0x90, 0x00, 0x00, 0x00, // Code for char &
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char '
0x05, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0xFC, 0x00, 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for char (
0x05, 0x00, 0x00, 0x00, 0x00, 0x86, 0x01, 0xFC, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char )
0x07, 0x00, 0x00, 0x04, 0x00, 0x14, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x14, 0x00, 0x04, 0x00, // Code for char *
0x06, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x7C, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char +
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ,
0x06, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, // Code for char -
0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char .
0x06, 0x00, 0x00, 0x80, 0x01, 0xF0, 0x01, 0x7C, 0x00, 0x1F, 0x00, 0x03, 0x00, 0x00, 0x00, // Code for char /
0x06, 0x00, 0x00, 0x7C, 0x00, 0xFE, 0x00, 0x82, 0x00, 0xFE, 0x00, 0x7C, 0x00, 0x00, 0x00, // Code for char 0
0x07, 0x00, 0x00, 0x84, 0x00, 0x84, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0x80, 0x00, 0x80, 0x00, // Code for char 1
0x06, 0x00, 0x00, 0xC4, 0x00, 0xE6, 0x00, 0xB2, 0x00, 0x9E, 0x00, 0x8C, 0x00, 0x00, 0x00, // Code for char 2
0x06, 0x00, 0x00, 0x44, 0x00, 0x92, 0x00, 0x92, 0x00, 0xFE, 0x00, 0x6C, 0x00, 0x00, 0x00, // Code for char 3
0x06, 0x30, 0x00, 0x28, 0x00, 0xA4, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xA0, 0x00, 0x00, 0x00, // Code for char 4
0x06, 0x00, 0x00, 0x5E, 0x00, 0x8E, 0x00, 0x8A, 0x00, 0xFA, 0x00, 0x72, 0x00, 0x00, 0x00, // Code for char 5
0x06, 0x00, 0x00, 0x78, 0x00, 0xFC, 0x00, 0x96, 0x00, 0xF2, 0x00, 0x62, 0x00, 0x00, 0x00, // Code for char 6
0x06, 0x00, 0x00, 0x06, 0x00, 0x02, 0x00, 0xE2, 0x00, 0xFE, 0x00, 0x1E, 0x00, 0x00, 0x00, // Code for char 7
0x06, 0x00, 0x00, 0x6C, 0x00, 0xFE, 0x00, 0x92, 0x00, 0xFE, 0x00, 0x6C, 0x00, 0x00, 0x00, // Code for char 8
0x06, 0x00, 0x00, 0x8C, 0x00, 0x9E, 0x00, 0xD2, 0x00, 0x7E, 0x00, 0x3C, 0x00, 0x00, 0x00, // Code for char 9
0x04, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char :
0x04, 0x00, 0x00, 0x00, 0x00, 0x88, 0x01, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ;
0x06, 0x10, 0x00, 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, 0x44, 0x00, 0x82, 0x00, 0x00, 0x00, // Code for char <
0x07, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, // Code for char =
0x07, 0x0
Of course: there is no information about following char informations !
following code show the difference between codes: here, with already working font, you have many (red color) lines before real chars individual declaration witch is different from code generated by GLCD.
Probably I didn't understand something but I can't see any other option in GLCD font creator for this
------------------
const code char Arial21x24_Bold[] = {
0x00,
0x00,
0x20,0x00,
0x7F,0x00,
0x18,
0x00,
0x01,0x88,0x01,0x00,
0x05,0xA0,0x01,0x00,
0x09,0xB8,0x01,0x00,
0x0C,0xE8,0x01,0x00,
0x0B,0x18,0x02,0x00,
0x10,0x48,0x02,0x00,
0x0F,0x78,0x02,0x00,
0x04,0xA8,0x02,0x00,
0x06,0xC0,0x02,0x00,
0x06,0xD8,0x02,0x00,
0x08,0xF0,0x02,0x00,
0x0C,0x08,0x03,0x00,
0x04,0x38,0x03,0x00,
0x07,0x50,0x03,0x00,
0x04,0x68,0x03,0x00,
0x06,0x80,0x03,0x00,
0x0B,0x98,0x03,0x00,
0x09,0xC8,0x03,0x00,
0x0B,0xF8,0x03,0x00,
0x0B,0x28,0x04,0x00,
0x0B,0x58,0x04,0x00,
0x0B,0x88,0x04,0x00,
0x0B,0xB8,0x04,0x00,
0x0B,0xE8,0x04,0x00,
0x0B,0x18,0x05,0x00,
0x0B,0x48,0x05,0x00,
0x05,0x78,0x05,0x00,
0x05,0x90,0x05,0x00,
0x0B,0xA8,0x05,0x00,
0x0B,0xD8,0x05,0x00,
0x0B,0x08,0x06,0x00,
0x0C,0x38,0x06,0x00,
0x14,0x68,0x06,0x00,
0x0F,0xB0,0x06,0x00,
0x0E,0xE0,0x06,0x00,
0x0E,0x10,0x07,0x00,
0x0E,0x40,0x07,0x00,
0x0D,0x70,0x07,0x00,
0x0C,0xA0,0x07,0x00,
0x0F,0xD0,0x07,0x00,
0x0D,0x00,0x08,0x00,
0x04,0x30,0x08,0x00,
0x0A,0x48,0x08,0x00,
0x0E,0x78,0x08,0x00,
0x0C,0xA8,0x08,0x00,
0x10,0xD8,0x08,0x00,
0x0D,0x08,0x09,0x00,
0x0F,0x38,0x09,0x00,
0x0D,0x68,0x09,0x00,
0x10,0x98,0x09,0x00,
0x0E,0xC8,0x09,0x00,
0x0D,0xF8,0x09,0x00,
0x0C,0x28,0x0A,0x00,
0x0D,0x58,0x0A,0x00,
0x0D,0x88,0x0A,0x00,
0x15,0xB8,0x0A,0x00,
0x0D,0x00,0x0B,0x00,
0x0D,0x30,0x0B,0x00,
0x0C,0x60,0x0B,0x00,
0x07,0x90,0x0B,0x00,
0x06,0xA8,0x0B,0x00,
0x05,0xC0,0x0B,0x00,
0x0B,0xD8,0x0B,0x00,
0x0C,0x08,0x0C,0x00,
0x04,0x38,0x0C,0x00,
0x0C,0x50,0x0C,0x00,
0x0C,0x80,0x0C,0x00,
0x0B,0xB0,0x0C,0x00,
0x0C,0xE0,0x0C,0x00,
0x0B,0x10,0x0D,0x00,
0x08,0x40,0x0D,0x00,
0x0C,0x58,0x0D,0x00,
0x0C,0x88,0x0D,0x00,
0x04,0xB8,0x0D,0x00,
0x04,0xD0,0x0D,0x00,
0x0B,0xE8,0x0D,0x00,
0x04,0x18,0x0E,0x00,
0x12,0x30,0x0E,0x00,
0x0C,0x78,0x0E,0x00,
0x0C,0xA8,0x0E,0x00,
0x0C,0xD8,0x0E,0x00,
0x0C,0x08,0x0F,0x00,
0x08,0x38,0x0F,0x00,
0x0B,0x50,0x0F,0x00,
0x06,0x80,0x0F,0x00,
0x0C,0x98,0x0F,0x00,
0x0C,0xC8,0x0F,0x00,
0x0F,0xF8,0x0F,0x00,
0x0B,0x28,0x10,0x00,
0x0B,0x58,0x10,0x00,
0x0A,0x88,0x10,0x00,
0x08,0xB8,0x10,0x00,
0x04,0xD0,0x10,0x00,
0x07,0xE8,0x10,0x00,
0x0B,0x00,0x11,0x00,
0x0E,0x30,0x11,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char num 32
0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x08,0x08,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00,0x00, // Code for char num 33
0x00,0x00,0x00,0x00,0x
------------------
- dejan.odabasic
- mikroElektronika team
- Posts: 2649
- Joined: 30 Apr 2012 14:20
Re: Is it possible to create a new font size for IL9341 ?
Hello,
The 'Export for TFT and new GLCD' option should be used: Best regards.
The 'Export for TFT and new GLCD' option should be used: Best regards.
-
- Posts: 240
- Joined: 16 Jan 2010 22:26
Re: Is it possible to create a new font size for IL9341 ?
You're screen is not the same: I haven't this function ! bad download ? (but same version displayed)
[/URL]
OK !!
I found how to show this option
Thanks a lot.
[/URL]
OK !!
I found how to show this option
Thanks a lot.