|
at24cm0x 1.0
at24cm0x driver library
|
Source file containing character lookup function for text rendering. More...
#include "font.h"
Functions | |
| void | font_get_bitmap (char character, unsigned char *bitmap) |
| Retrieves the bitmap array for a given ASCII character from the font table. | |
Variables | |
| const unsigned char | font_ascii_table [][5] |
Source file containing character lookup function for text rendering.
This file defines the font data table map function. The character table entries represent the bitmap patterns for individual characters, which are selected by the lookup function font_get_bitmap(). This function handles bounds checking and optional conversion of lowercase to uppercase letters when enabled, to optimize memory usage. The table and accessor function are designed for use in embedded systems with constrained storage, such as microcontrollers, where font data is read for graphical text displays.
The configuration macros allow customization:
| void font_get_bitmap | ( | char | character, |
| unsigned char * | bitmap ) |
Retrieves the bitmap array for a given ASCII character from the font table.
| character | The ASCII character to retrieve the bitmap for. |
| bitmap | Pointer to a array for storing the bitmap bytes representing the character. |
This function maps an input ASCII character to its corresponding bitmap pattern stored in the font table. If the character is outside the supported ASCII range defined by FONT_ASCII_START_CHAR and FONT_ASCII_END_CHAR, it defaults is the '?' character. When the macro FONT_IGNORE_LOWER_CASE is defined, lowercase letters are converted to uppercase to save memory, and adjustments are made to the character code accordingly.

|
extern |