ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_gfx_font_t Struct Reference

Monochrome, fixed-width bitmap font descriptor. More...

#include <ra8_gfx_font.h>

Data Fields

const uint8_t * glyph_data
 Packed glyph bitmaps; size = bytes_per_glyph * glyph_count.
uint8_t glyph_width
 Glyph width in pixels.
uint8_t glyph_height
 Glyph height in pixels.
uint8_t bytes_per_glyph
 Bytes occupied by one glyph (rows * ceil(width/8)).
uint8_t first_codepoint
 Lowest stored codepoint (typically 0x20, space).
uint8_t last_codepoint
 Highest stored codepoint (typically 0x7E, '~').

Detailed Description

Monochrome, fixed-width bitmap font descriptor.

Glyphs are packed left-to-right, MSB-first within each byte; rows are stored top-to-bottom; glyphs are stored in ascending codepoint order.

Invariant
glyph_width >= 1 && glyph_height >= 1
bytes_per_glyph == ((glyph_width + 7) / 8) * glyph_height
first_codepoint <= last_codepoint

Definition at line 46 of file ra8_gfx_font.h.

Field Documentation

◆ bytes_per_glyph

uint8_t ra8_gfx_font_t::bytes_per_glyph

Bytes occupied by one glyph (rows * ceil(width/8)).

Definition at line 50 of file ra8_gfx_font.h.

Referenced by internal_render_glyph().

◆ first_codepoint

uint8_t ra8_gfx_font_t::first_codepoint

Lowest stored codepoint (typically 0x20, space).

Definition at line 51 of file ra8_gfx_font.h.

Referenced by internal_render_glyph().

◆ glyph_data

const uint8_t* ra8_gfx_font_t::glyph_data

Packed glyph bitmaps; size = bytes_per_glyph * glyph_count.

Definition at line 47 of file ra8_gfx_font.h.

Referenced by internal_render_glyph().

◆ glyph_height

uint8_t ra8_gfx_font_t::glyph_height

Glyph height in pixels.

Definition at line 49 of file ra8_gfx_font.h.

Referenced by internal_render_glyph(), and ra8_gfx_text_size().

◆ glyph_width

uint8_t ra8_gfx_font_t::glyph_width

Glyph width in pixels.

Definition at line 48 of file ra8_gfx_font.h.

Referenced by internal_render_glyph(), ra8_gfx_text_out(), and ra8_gfx_text_size().

◆ last_codepoint

uint8_t ra8_gfx_font_t::last_codepoint

Highest stored codepoint (typically 0x7E, '~').

Definition at line 52 of file ra8_gfx_font.h.

Referenced by internal_render_glyph().


The documentation for this struct was generated from the following file: