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

#include <hikogui/font/glyph_metrics.hpp>

Public Member Functions

 glyph_metrics (glyph_metrics const &) noexcept=default
 
 glyph_metrics (glyph_metrics &&) noexcept=default
 
glyph_metricsoperator= (glyph_metrics const &) noexcept=default
 
glyph_metricsoperator= (glyph_metrics &&) noexcept=default
 

Data Fields

aarectangle bounding_rectangle = {}
 
float left_side_bearing = 0.0f
 
float right_side_bearing = 0.0f
 
float advance = 0.0f
 

Friends

constexpr friend glyph_metrics operator* (float const &lhs, glyph_metrics const &rhs) noexcept
 Scale the metrics by a scalar value.
 

Detailed Description

Metrics of a glyph. This information is used to position glyphs next to each other and determinate the size of a shaped text.

Friends And Related Symbol Documentation

◆ operator*

constexpr friend glyph_metrics operator* ( float const & lhs,
glyph_metrics const & rhs )
friend

Scale the metrics by a scalar value.

Field Documentation

◆ advance

float v1::glyph_metrics::advance = 0.0f

The distance to the next character.

◆ bounding_rectangle

aarectangle v1::glyph_metrics::bounding_rectangle = {}

Bounding box of the path.

◆ left_side_bearing

float v1::glyph_metrics::left_side_bearing = 0.0f

This is the position where the left side of the glyph starts. This includes some leading white space so that the glyph will stand a small distance of the edge.

For many glyphs the leftSideBearing is the origin.

◆ right_side_bearing

float v1::glyph_metrics::right_side_bearing = 0.0f

This is the position where the right side of the glyph ends. This includes some leading white space so that the glyph will stand a small distance of the edge.


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