CHGame 0.3.0
Libraries for the CHGame handheld
Loading...
Searching...
No Matches
GFXglyph Struct Reference

One glyph's record in a GFXfont: where its bitmap is, its size, and where it sits relative to the pen. More...

#include <CHGfx_gfxfont.h>

Public Attributes

uint16_t bitmapOffset
 byte offset of this glyph's first row

 
uint8_t width
 bitmap width in pixels

 
uint8_t height
 bitmap height in pixels

 
uint8_t xAdvance
 pen movement after drawing

 
int8_t xOffset
 pen x -> bitmap left edge

 
int8_t yOffset
 baseline -> bitmap top edge (negative up)
 

Detailed Description

One glyph's record in a GFXfont: where its bitmap is, its size, and where it sits relative to the pen.

A glyph is drawn relative to the pen position (x, y), where y is the BASELINE, not the top:

  • upper-left corner = (x + xOffset, y + yOffset) (yOffset is negative)
  • next pen position = (x + xAdvance, y)
  • next line = y + GFXfont::yAdvance

Member Data Documentation

◆ bitmapOffset

uint16_t GFXglyph::bitmapOffset

byte offset of this glyph's first row

◆ width

uint8_t GFXglyph::width

bitmap width in pixels

◆ height

uint8_t GFXglyph::height

bitmap height in pixels

◆ xAdvance

uint8_t GFXglyph::xAdvance

pen movement after drawing

◆ xOffset

int8_t GFXglyph::xOffset

pen x -> bitmap left edge

◆ yOffset

int8_t GFXglyph::yOffset

baseline -> bitmap top edge (negative up)


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