Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::graphics::gui::fonts::GlyphMetrics Class Reference

A class that describes sizing information about a particular font glyph. More...

#include <omGraphicsGUIGlyphMetrics.h>

Public Member Functions

 GlyphMetrics ()
 Create a default glyph metrics object. More...
 
 GlyphMetrics (Float newSize, Float newHeight, const AABB2f &newBounds, const Vector2f &newAdvance)
 Create a glyph metrics object with the specified attributes. More...
 
Float getSize () const
 Return the nominal size of the glyph's font in pixels. More...
 
void setSize (Float newSize)
 Set the nominal size of the glyph's font in pixels. More...
 
Float getHeight () const
 Return the distance in pixels between consecutive horizontal lines of text of the glyph's font. More...
 
void setHeight (Float newHeight)
 Set the distance in pixels between consecutive horizontal lines of text of the glyph's font. More...
 
const AABB2fgetBounds () const
 Return a 2D bounding box which completely encloses the glyphs. More...
 
void setBounds (const AABB2f &newBounds)
 Set a 2D bounding box which completely encloses the glyphs. More...
 
const Vector2fgetAdvance () const
 Return the vector in pixels from the origin of the glyph to the next glyph for the font. More...
 
void setAdvance (const Vector2f &newAdvance)
 Set the vector in pixels from the origin of the glyph to the next glyph for the font. More...
 

Detailed Description

A class that describes sizing information about a particular font glyph.

Constructor & Destructor Documentation

om::graphics::gui::fonts::GlyphMetrics::GlyphMetrics ( )
inline

Create a default glyph metrics object.

om::graphics::gui::fonts::GlyphMetrics::GlyphMetrics ( Float  newSize,
Float  newHeight,
const AABB2f newBounds,
const Vector2f newAdvance 
)
inline

Create a glyph metrics object with the specified attributes.

Member Function Documentation

Float om::graphics::gui::fonts::GlyphMetrics::getSize ( ) const
inline

Return the nominal size of the glyph's font in pixels.

void om::graphics::gui::fonts::GlyphMetrics::setSize ( Float  newSize)
inline

Set the nominal size of the glyph's font in pixels.

Float om::graphics::gui::fonts::GlyphMetrics::getHeight ( ) const
inline

Return the distance in pixels between consecutive horizontal lines of text of the glyph's font.

void om::graphics::gui::fonts::GlyphMetrics::setHeight ( Float  newHeight)
inline

Set the distance in pixels between consecutive horizontal lines of text of the glyph's font.

const AABB2f& om::graphics::gui::fonts::GlyphMetrics::getBounds ( ) const
inline

Return a 2D bounding box which completely encloses the glyphs.

This bounding box is specified where (0,0) is the origin of a glyph. The bounding box is expressed in units of pixels.

void om::graphics::gui::fonts::GlyphMetrics::setBounds ( const AABB2f newBounds)
inline

Set a 2D bounding box which completely encloses the glyphs.

This bounding box is specified where (0,0) is the origin of a glyph. The bounding box is expressed in units of pixels.

const Vector2f& om::graphics::gui::fonts::GlyphMetrics::getAdvance ( ) const
inline

Return the vector in pixels from the origin of the glyph to the next glyph for the font.

This value is returned for both the horizontal and vertical directions. It does not include any kerning between the glyphs. Use the font's kerning accessor method to get the proper kerning for pairs of glyphs.

void om::graphics::gui::fonts::GlyphMetrics::setAdvance ( const Vector2f newAdvance)
inline

Set the vector in pixels from the origin of the glyph to the next glyph for the font.

This value is returned for both the horizontal and vertical directions. It does not include any kerning between the glyphs. Use the font's kerning accessor method to get the proper kerning for pairs of glyphs.


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