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

A class that describes sizing information for a particular Font. More...

#include <omGraphicsGUIFontMetrics.h>

Public Member Functions

 FontMetrics ()
 Create a default font metrics object with the default layout. More...
 
Float getSize () const
 Return the nominal size of the font in pixels. More...
 
void setSize (Float newSize)
 Set the nominal size of the font in pixels. More...
 
const TextLayoutgetLayout () const
 Return a reference to an object that describes the direction that the font is layed out. More...
 
void setLayout (const TextLayout &newLayout)
 Set an object that describes the direction that the font is layed out. More...
 
const Vector2fgetLineAdvance () const
 Return the vector in pixels between consecutive lines of text of the font. More...
 
void setLineAdvance (const Vector2f &newLineAdvance)
 Set the vector in pixels between consecutive lines of text of the font. More...
 
const AABB2fgetBounds () const
 Return a 2D bounding box which encloses all glyphs that are part of the font. More...
 
void setBounds (const AABB2f &newGlyphBounds)
 Set a 2D bounding box which encloses all glyphs that are part of the font. More...
 
const AABB2fgetMaxBounds () const
 Return a 2D bounding box which encloses all glyphs that are part of the font. More...
 
void setMaxBounds (const AABB2f &newMaxGlyphBounds)
 Set a 2D bounding box which encloses all glyphs that are part of the font. More...
 
const Vector2fgetMaxAdvance () const
 Return the maximum distance in pixels from the origin of a first glyph to that of a second glyph for the font. More...
 
void setMaxAdvance (const Vector2f &newMaxAdvance)
 Set the maximum distance in pixels from the origin of a first glyph to that of a second glyph for the font. More...
 

Detailed Description

A class that describes sizing information for a particular Font.

Constructor & Destructor Documentation

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

Create a default font metrics object with the default layout.

Member Function Documentation

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

Return the nominal size of the font in pixels.

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

Set the nominal size of the font in pixels.

const TextLayout& om::graphics::gui::fonts::FontMetrics::getLayout ( ) const
inline

Return a reference to an object that describes the direction that the font is layed out.

void om::graphics::gui::fonts::FontMetrics::setLayout ( const TextLayout newLayout)
inline

Set an object that describes the direction that the font is layed out.

const Vector2f& om::graphics::gui::fonts::FontMetrics::getLineAdvance ( ) const
inline

Return the vector in pixels between consecutive lines of text of the font.

void om::graphics::gui::fonts::FontMetrics::setLineAdvance ( const Vector2f newLineAdvance)
inline

Set the vector in pixels between consecutive lines of text of the font.

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

Return a 2D bounding box which encloses all glyphs that are part of the font.

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::FontMetrics::setBounds ( const AABB2f newGlyphBounds)
inline

Set a 2D bounding box which encloses all glyphs that are part of the font.

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

const AABB2f& om::graphics::gui::fonts::FontMetrics::getMaxBounds ( ) const
inline

Return a 2D bounding box which encloses all glyphs that are part of the font.

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::FontMetrics::setMaxBounds ( const AABB2f newMaxGlyphBounds)
inline

Set a 2D bounding box which encloses all glyphs that are part of the font.

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::FontMetrics::getMaxAdvance ( ) const
inline

Return the maximum distance in pixels from the origin of a first glyph to that of a second glyph for the font.

This value is returned for both the horizontal and vertical directions.

void om::graphics::gui::fonts::FontMetrics::setMaxAdvance ( const Vector2f newMaxAdvance)
inline

Set the maximum distance in pixels from the origin of a first glyph to that of a second glyph for the font.

This value is specified for both the horizontal and vertical directions.


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