HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
v1::font::shape_run_result_type Struct Reference

Public Member Functions

void reserve (size_t count) noexcept
 
void scale_and_offset (float s) noexcept
 Scale and position the result of the run.
 

Data Fields

std::vector< float > advances
 The horizontal advance of each grapheme.
 
std::vector< size_t > glyph_count
 The number of glyphs used by each grapheme.
 
std::vector< glyph_idglyphs
 The glyphs representing all the graphemes.
 
std::vector< point2glyph_positions
 Position of each glyph, relative to the grapheme.
 
std::vector< aarectangle > glyph_rectangles
 The bounding rectangle for each glyph, relative to glyph_position.
 

Member Function Documentation

◆ scale_and_offset()

void v1::font::shape_run_result_type::scale_and_offset ( float s)
inlinenoexcept

Scale and position the result of the run.

Parameters
sThe font-size to scale by
xThe horizontal position, calculated after scaling

Field Documentation

◆ advances

std::vector<float> v1::font::shape_run_result_type::advances

The horizontal advance of each grapheme.

◆ glyph_count

std::vector<size_t> v1::font::shape_run_result_type::glyph_count

The number of glyphs used by each grapheme.

◆ glyph_positions

std::vector<point2> v1::font::shape_run_result_type::glyph_positions

Position of each glyph, relative to the grapheme.

There is exactly one position for each glyph.

◆ glyph_rectangles

std::vector<aarectangle> v1::font::shape_run_result_type::glyph_rectangles

The bounding rectangle for each glyph, relative to glyph_position.

There is exactly one bounding rectangle for each glyph.

◆ glyphs

std::vector<glyph_id> v1::font::shape_run_result_type::glyphs

The glyphs representing all the graphemes.

There may be zero or more glyphs for each grapheme. The difference may be due to having to add accent-glyphs or merging glyphs into ligatures.


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