Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 8 months ago.
Adding additional fonts to the library
Do you have any documentation explaining how to include a new font. I tried the following and it did not work.
I downloaded the MikroElectronika GLCD Font Creator 220.127.116.11 for Windows.
To start my test, I imported an existing system font, namely Arial font size 9 normal text (not bold, italic etc.). I was then presented with a list of import options in a dialog box and I kept the defaults.
I then selected the "export for GLCD" toolbar button. I was then presented with a dialog box providing library code for 3 languages. I selected the mikroC option and you can then copy this code to clipboard which I did.
I then created a new library file in my mbed font library and pasted this code into the new .h file. I then compared this with the existing font file "Arial12x12.h" and the data matched except for the following:
1. "align(2)" is included in all demo font files but this is not shown in mikroC option.
2. "25,12,12,2, Length,horz,vert,byte/vert" in the first line of the char array
3. uses unsigned short instead of unsigned char.
Where do these additions come from and what do they mean. The second item is rather perplexing as this differs for each of the font files included in this library.
Then any tips on handling short integer type instead of char to get this library to work.