Go to the documentation of this file.
51 #ifndef HAL_GFX_FONT_H__
52 #define HAL_GFX_FONT_H__
63 #define HAL_GFX_ALIGNX_LEFT (0x00U)
64 #define HAL_GFX_ALIGNX_RIGHT (0x01U)
65 #define HAL_GFX_ALIGNX_CENTER (0x02U)
66 #define HAL_GFX_ALIGNX_JUSTIFY (0x03U)
67 #define HAL_GFX_ALIGNX_MASK (0x03U)
68 #define HAL_GFX_ALIGNY_TOP (0x00U)
69 #define HAL_GFX_ALIGNY_BOTTOM (0x04U)
70 #define HAL_GFX_ALIGNY_CENTER (0x08U)
71 #define HAL_GFX_ALIGNY_JUSTIFY (0x0cU)
72 #define HAL_GFX_ALIGNY_MASK (0x0cU)
73 #define HAL_GFX_TEXT_WRAP (0x10U)
173 void hal_gfx_print(
const char *str,
int x,
int y,
int w,
int h, uint32_t fg_col, uint32_t align);
201 #endif // HAL_GFX_FONT_H__
uint8_t bpp
bits per pixel setting
const int bitmap_size
bitmap size
const hal_gfx_font_range_t * ranges
the font range
uint8_t xAdvance
glyph advanced setting
int8_t yOffset
vertical offset
uint8_t yAdvance
vertical advance setting
uint32_t bitmapOffset
glyph bitmap offset address
Font Kerning setting Structure.
Font range setting Structure.
const hal_gfx_glyph_t * glyphs
pointer to glyphs
The base structure of gpu memory.
int8_t xOffset
horizontal offset
void hal_gfx_print(const char *str, int x, int y, int w, int h, uint32_t fg_col, uint32_t align)
Print pre-formatted text.
uint32_t first
first font to apply glyphs
uint32_t kern_offset
Kerning offset.
Font glyph setting Structure.
uint8_t kern_length
Kerning length.
int hal_gfx_string_get_bbox(const char *str, int *w, int *h, int max_w, uint32_t wrap)
Get the bounding box's width and height of a string.
uint32_t left
Neighbor character to the left of the current one (Unicode value)
const hal_gfx_kern_pair_t * kern_pairs
pointer to kern pair
uint8_t max_ascender
max ascender setting
uint32_t flags
specify the flag
void hal_gfx_print_to_position(const char *str, int *pos_x, int *pos_y, int x, int y, int w, int h, uint32_t fg_col, uint32_t align)
Print pre-formatted text.
int8_t x_offset
Kerning offset (horizontally)
uint32_t last
last font to apply glyphs
void hal_gfx_bind_font(hal_gfx_font_t *font)
Bind the font to use in future hal_gfx_print() calls.
uint8_t xAdvance
horizontal advance setting
hal_gfx_buffer_t bo
the base object
const uint8_t * bitmap
pointer to bitmap
Header file containing functions prototypes of Graphics library.