Datasheet
Glcd_Set_Font
292
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Glcd_Set_Font(const char *activeFont, unsigned short
aFontWidth, unsigned short aFontHeight, unsigned int aFontOffs);
Returns Nothing.
Description
Sets font that will be used with Glcd_Write_Char and Glcd_Write_Text routines.
Parameters :
- activeFont: font to be set. Needs to be formatted as an array of char
- aFontWidth: width of the font characters in dots.
- aFontHeight: height of the font characters in dots.
- aFontOffs: number that represents difference between the mikroC
PRO for AVR character set and regular ASCII set (eg. if 'A' is 65 in
ASCII character, and 'A' is 45 in the mikroC PRO for AVR character
set, aFontOffs is 20). Demo fonts supplied with the library have an off-
set of 32, which means that they start with space.
The user can use fonts given in the file “__Lib_GLCDFonts” file located in the
Uses folder or create his own fonts.
Requires Glcd needs to be initialized, see Glcd_Init routine.
Example
// Use the custom 5x7 font "myfont" which starts with space (32):
Glcd_Set_Font(myfont, 5, 7, 32);