Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::text::Layout::Glyph Struct Reference

A Glyph represents one character glyph in the layout. More...

#include "layout.h"

Collaboration diagram for ion::text::Layout::Glyph:

Public Member Functions

 Glyph ()
 The default constructor sets an invalid index (0, the NUL character) and sets all quadrilateral points to the origin, and has empty tight bounds. More...
 
 Glyph (GlyphIndex glyph_index_in, const Quad &quad_in, const math::Range2f &bounds_in, const math::Vector2f &offset_in)
 Constructor taking specifics. More...
 

Public Attributes

GlyphIndex glyph_index
 
Quad quad
 
math::Range2f bounds
 
math::Vector2f offset
 Offset from text insertion point to glyph bounds' lower left corner. More...
 

Detailed Description

A Glyph represents one character glyph in the layout.

It contains the index of the glyph within the font and the Quad defining the 3D quadrilateral onto which the glyph is mapped.

Definition at line 160 of file layout.h.

Constructor & Destructor Documentation

ion::text::Layout::Glyph::Glyph ( )
inline

The default constructor sets an invalid index (0, the NUL character) and sets all quadrilateral points to the origin, and has empty tight bounds.

Definition at line 163 of file layout.h.

ion::text::Layout::Glyph::Glyph ( GlyphIndex  glyph_index_in,
const Quad quad_in,
const math::Range2f bounds_in,
const math::Vector2f &  offset_in 
)
inline

Constructor taking specifics.

Definition at line 166 of file layout.h.

Member Data Documentation

math::Range2f ion::text::Layout::Glyph::bounds

Definition at line 175 of file layout.h.

math::Vector2f ion::text::Layout::Glyph::offset

Offset from text insertion point to glyph bounds' lower left corner.

For example a '1' glyph often has a positive x offset to keep it from appearing too tight relative to surrounding glyphs, and glyphs with descenders like 'g', 'j', etc. will have a negative y offset.

Definition at line 180 of file layout.h.

Quad ion::text::Layout::Glyph::quad

Definition at line 174 of file layout.h.

Referenced by ion::text::operator<<(), and ion::text::Builder::StoreGlyphVertices().


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