Skip to main content

GlyphNode

struct providing information about a glyph. Used by LCD when rendering.

Public Functions

FORCE_INLINE_FUNCTION uint16_tadvance() const
Gets the "advance" value where the 9th bit is stored in flags.
FORCE_INLINE_FUNCTION int16_theight() const
Gets the "height" value where the 9th bit is stored in flags.
FORCE_INLINE_FUNCTION uint16_tkerningTablePos() const
Gets the "kerningTablePos" value where the 8th and 9th bits are stored in flags.
FORCE_INLINE_FUNCTION voidsetTop(int16_t newTop)
Sets a new value for top.
FORCE_INLINE_FUNCTION int16_ttop() const
Gets the "top" value where the 9th bit and the sign bit are stored in flags.
FORCE_INLINE_FUNCTION int16_twidth() const
Gets the "width" value where the 9th bit is stored in flags.

Public Attributes

uint8_t_advance
Width of the glyph (including space to the left and right)
uint8_t_height
Height of the actual glyph data.
uint8_t_kerningTablePos
Where are the kerning information for this glyph stored in the kerning table.
uint8_t_top
Vertical offset from baseline of the glyph.
uint8_t_width
Width of the actual glyph data.
uint32_tdataOffset
The index to the data of this glyph.
uint8_tflags
Additional glyph flags (font encoding and extra precision for width/height/top/advance)
uint8_tkerningTableSize
How many entries are there in the kerning table (following kerningTablePos) for this glyph.
int8_tleft
Horizontal offset from the left of the glyph.
Unicode::UnicodeCharunicode
The Unicode of this glyph.

Public Functions Documentation

advance

FORCE_INLINE_FUNCTION uint16_t advance()const

Gets the "advance" value where the 9th bit is stored in flags.

Returns:

the right value of "advance".

height

FORCE_INLINE_FUNCTION int16_t height()const

Gets the "height" value where the 9th bit is stored in flags.

Returns:

the right value of "height".

kerningTablePos

FORCE_INLINE_FUNCTION uint16_t kerningTablePos()const

Gets the "kerningTablePos" value where the 8th and 9th bits are stored in flags.

Returns:

the right value of "kerningTablePos".

setTop

FORCE_INLINE_FUNCTION void setTop(int16_tnewTop)

Sets a new value for top.

Used to adjust the vertical position of a glyph - this is used when positioning some Thai glyphs and some Arabic glyphs.

Parameters:
newTopThe new top.

top

FORCE_INLINE_FUNCTION int16_t top()const

Gets the "top" value where the 9th bit and the sign bit are stored in flags.

Returns:

the right value of "top".

width

FORCE_INLINE_FUNCTION int16_t width()const

Gets the "width" value where the 9th bit is stored in flags.

Returns:

the right value of "width".

Public Attributes Documentation

_advance

uint8_t _advance

Width of the glyph (including space to the left and right)

_height

uint8_t _height

Height of the actual glyph data.

_kerningTablePos

uint8_t _kerningTablePos

Where are the kerning information for this glyph stored in the kerning table.

_top

uint8_t _top

Vertical offset from baseline of the glyph.

_width

uint8_t _width

Width of the actual glyph data.

dataOffset

uint32_t dataOffset

The index to the data of this glyph.

flags

uint8_t flags

Additional glyph flags (font encoding and extra precision for width/height/top/advance)

kerningTableSize

uint8_t kerningTableSize

How many entries are there in the kerning table (following kerningTablePos) for this glyph.

left

int8_t left

Horizontal offset from the left of the glyph.

unicode

The Unicode of this glyph.