lpcware

How to extend emWin library font?

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by harper on Sat Oct 26 08:43:29 MST 2013
The emWin library comes with small text fonts. These could be magnified to 32 pixels but this would give a worse appearance as the digital fonts can give. The digital fonts include only the characters '0' ..' 9' '+' '-' '.'

Since the digial font GUI_FontD32 doesn't provide all but one character I think it would be worth to extend this font. I just need one additonal character '/'.

I was able to create the appropriate GUI_FONT_PROP_EXT structure that holds the information for the additional character. I realized that the GUI_FONT member pPropExt must point to a sorted linked list of GUI_FONT_PROP_EXT elements. I've built a sorted list and got my new character included. The problem is that I get a scrambled pattern. Even the dump of the existing character bitmaps appears as unrelated to the pixels drawn to screen.

What is the way to add a character to a library font (where no C file is available)?

Outcomes