I only needed digits, space, dot and minus for a project as was getting a bit short on available code space in the MCU, so I added the possibility to selectively disable (null out) the unused characters to save some space. For my desired characters I set the range to 0x20..0x39 and disabled the characters I didn't need in the range, resulting in a gain of about 600 bytes compared to just extracting the range from the full charset.
The disabled characters simply points to the same location in the bitmap as the previous character and gets its bitmap width and height set to 0. So there still are entries for the disabled characters in the GFXglyph-struct, but no data in the bitmap for them - this keeps the characters in their correct places in the ASCII table.
I only needed digits, space, dot and minus for a project as was getting a bit short on available code space in the MCU, so I added the possibility to selectively disable (null out) the unused characters to save some space. For my desired characters I set the range to 0x20..0x39 and disabled the characters I didn't need in the range, resulting in a gain of about 600 bytes compared to just extracting the range from the full charset.
The disabled characters simply points to the same location in the bitmap as the previous character and gets its bitmap width and height set to 0. So there still are entries for the disabled characters in the GFXglyph-struct, but no data in the bitmap for them - this keeps the characters in their correct places in the ASCII table.