User manual

Table Of Contents
mikroC PRO for PIC32
MikroElektronika
335
Glcd_Set_Font
Prototype
void Glcd_Set_Font(const char *activeFont, unsigned short aFontWidth,
unsigned short aFontHeight, unsigned int aFontOffs);
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 PIC32 character set
and regular ASCII set (eg. if ‘Ais 65 in ASCII character, and ‘A is 45 in the mikroC PRO for PIC32
character set, aFontOffs is 20). Demo fonts supplied with the library have an offset of 32, which means
that they start with space.
The user can use fonts given in the le “__Lib_GLCDFonts” le located in the Uses folder or create
his own fonts.
List of supported fonts:
- Font_Glcd_System3x5
- Font_Glcd_System5x7
- Font_Glcd_5x7
- Font_Glcd_Character8x7
For the sake of the backward compatibility, these fonts are supported also:
- System3x5 (equivalent to Font_Glcd_System3x5)
- FontSystem5x7_v2 (equivalent to Font_Glcd_System5x7)
- font5x7 (equivalent to Font_Glcd_5x7)
- Character8x7 (equivalent to Font_Glcd_Character8x7)
Returns Nothing.
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);
Notes None.