The current font rendering engine in GFX is a simple bitmap font solution. It is possible to supply your own fonts in your application code by including
#include "gdisp/fonts.h"
in your application and then defining your own font.
There are some limitations to this approach...
- The maximum native font size is 16 bits. This can be increased to 32 bits by putting #define GDISP_MAX_FONT_HEIGHT 32 in your gfxconf.h. Note, doing this doubles the size of the in-built font tables.
- Fonts can then be scaled using the x and Y scaling factor. This is pure bitmap scaling and therefore presents "jaggies" at larger scaling factors. I have found that scaling in the y direction is far more eye-pleasing than scaling in the x direction hence the standard range of "Narrow" fonts.
- Generalised anti-aliasing is generally not an option for bitmap fonts as it requires the ability to be able to read the existing pixel colors from the display hardware. Very few GDISP drivers actually support this. A more specific anti-alias routine could be written for when the font is being displayed with a filled background however this has not yet been done.
The proper solution is to support scalable fonts such as truetype. Although the GDISP API allows for this to happen transparently to the application code - this is a lot of work and therefore hasn't been done yet. There may also be significant RAM usage constraints on this as most scalable font libraries I have seen to date are rather heavy on their use of RAM.
Loading of fonts from an SD-Card or such (whether bitmap or scalable) is also allowed for in the current API but not implemented yet.
In general, if adding some of these nice features to the GDISP font handling is not practical for you, the only solution is to create a GDISP native format bitmap image of each character you want and to use the gdispBlitAreaEx() function to display them.
SIDE NOTE: BMP, GIF, JPG image decoders and supporting display routines are coming soon. Until then you will need to use hardware native pixel array images.
Hope this helps.