![]() |
ucglib_xmega_hal
4.0
Xmega Hardware Abstraction Layer for Ucglib
|
A customized version of ucg_font.c (d.d. January 2020) from Oli Kraus. More...
#include "ucg.h"
Macros | |
#define | UCG_FONT_DATA_STRUCT_SIZE 21 |
Typedefs | |
typedef void * | ucg_glyph_t |
Functions | |
void | ucg_font_GetStrSize (const _MEMX void *font, const char *s, ucg_int_t *width, ucg_int_t *height) |
void | ucg_font_GetStrSizeP (const _MEMX void *font, const char *s, ucg_int_t *width, ucg_int_t *height) |
void | ucg_font_AdjustXYToDraw (const _MEMX void *font, const char *s, ucg_int_t *x, ucg_int_t *y) |
void | ucg_font_AdjustXYToDrawP (const _MEMX void *font, const char *s, ucg_int_t *x, ucg_int_t *y) |
void | ucg_font_GetStrMinBox (ucg_t *ucg, const _MEMX void *font, const char *s, ucg_int_t *x, ucg_int_t *y, ucg_int_t *width, ucg_int_t *height) |
uint8_t | ucg_font_GetCapitalAHeight (const _MEMX void *font) |
uint8_t | ucg_font_GetFontStartEncoding (const _MEMX void *font_arg) |
uint8_t | ucg_font_GetFontEndEncoding (const _MEMX void *font_arg) |
size_t | ucg_font_GetSize (const _MEMX void *font_arg) |
uint8_t | ucg_GetFontBBXWidth (ucg_t *ucg) |
uint8_t | ucg_GetFontBBXHeight (ucg_t *ucg) |
int8_t | u8g_GetFontBBXOffX (ucg_t *ucg) UCG_NOINLINE |
int8_t | ucg_GetFontBBXOffY (ucg_t *ucg) UCG_NOINLINE |
uint8_t | ucg_IsGlyph (ucg_t *ucg, uint8_t requested_encoding) |
int8_t | ucg_GetGlyphWidth (ucg_t *ucg, uint8_t requested_encoding) |
void | ucg_SetFontMode (ucg_t *ucg, uint8_t is_transparent) |
ucg_int_t | ucg_DrawGlyph (ucg_t *ucg, ucg_int_t x, ucg_int_t y, uint8_t dir, uint8_t encoding) |
ucg_int_t | ucg_DrawString (ucg_t *ucg, ucg_int_t x, ucg_int_t y, uint8_t dir, const char *str) |
void | ucg_SetFontRefHeightText (ucg_t *ucg) |
void | ucg_SetFontRefHeightExtendedText (ucg_t *ucg) |
void | ucg_SetFontRefHeightAll (ucg_t *ucg) |
void | ucg_SetFontPosBaseline (ucg_t *ucg) |
void | ucg_SetFontPosBottom (ucg_t *ucg) |
void | ucg_SetFontPosTop (ucg_t *ucg) |
void | ucg_SetFontPosCenter (ucg_t *ucg) |
void | ucg_SetFont (ucg_t *ucg, const ucg_fntpgm_uint8_t *font) |
ucg_int_t | ucg_GetStrWidth (ucg_t *ucg, const char *s) |
A customized version of ucg_font.c (d.d. January 2020) from Oli Kraus.
This is the __mmex version of Oli Kraus's ucg_font.c, see ugclib.
The bitmap ucg_bmp.c addition to Kraus libray needs a __memx version of ucg_font.c.
All pointers to fonts (const void *
) are changed to __memx pointers (const _MEMX void *
), where _MEMX can be defined as __memx All ucg_pgm_read functioncalls are changed using a dmacro definition _PGM_pointer
for (ucg_pgm_uint8_t *
)
This implementation can use PROGMEM (<64K) with
#define _MEMX #define ucg_pgm_read(adr) pgm_read_byte_near(adr) #define _PGM_pointer (ucg_pgm_uint8_t *)
or use __memx (no 64K limit)
#define _MEMX __memx #define ucg_pgm_read(adr) (*(adr)) #define _PGM_pointer
These definitions can be added to the original ucg.h.