Changing the default Font

Microchip Graphics Library

Microchip Graphics Library
Changing the default Font

This instructions assumes that you have performed the conversion of your raster font or True Type font into C file. For the conversion of your raster font please see the help file of the Graphics Resource Converter utility that comes with the Graphics Library. 

There are two ways to replace the default font in the Graphics Library. 

 

Renaming User Font to GOLFontDefault:

  1. Open the generated font file (generated by the "Graphics Resource Converter" utility) and change the font structure name to GOLFontDefault (see figure below).

  1. Remove the file GOLFONTDefault.c in the project and replace it with your own font file that contains the GOLFontDefault.
  2. Build and test your new font.
 

Replacing the GOLFontDefault with any user defined fonts

  1. Open the GraphicsConfig.h file and add the following lines:

#define FONTDEFAULT yourFontName

  1. In the project, add the generated font file (generated by the "Graphics Resource Converter" utility).
  2. Build and test your new font.
In this method, GOL.h and GOLFontDefault.c files checks if FONTDEFAULT is defined. If it is, it skips the declaration of the GOLFontDefault and uses the user defined font.

Links
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved