Mikroelektronika MIKROE-724 データシート
360
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
Glcd_Set_Font
Prototype
sub procedure Glcd_Set_Font(dim byref const activeFont as byte, dim
aFontWidth, aFontHeight as byte, dim aFontOffs as byte)
Description Sets font that will be used with Glcd_Write_Char and Glcd_Write_Text routines.
Parameters -
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 mikroBasic PRO for dsPIC30/33 and
PIC24 character set and regular ASCII set (eg. if ‘A’ is 65 in ASCII character, and ‘A’ is 45 in the
mikroBasic PRO for dsPIC30/33 and PIC24 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 file “__Lib_GLCDFonts” file 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.