FastUIDraw
Public Member Functions | List of all members
fastuidraw::FontMetrics Class Reference

Represents various metric values global to an entire font. More...

#include <font_metrics.hpp>

Public Member Functions

 FontMetrics (void)
 
 FontMetrics (const FontMetrics &obj)
 
float ascender (void) const
 
FontMetricsascender (float)
 
float descender (void) const
 
FontMetricsdescender (float)
 
float height (void) const
 
FontMetricsheight (float)
 
FontMetricsoperator= (const FontMetrics &obj)
 
float strikeout_position (void) const
 
FontMetricsstrikeout_position (float)
 
float strikeout_thickness (void) const
 
FontMetricsstrikeout_thickness (float)
 
void swap (FontMetrics &obj)
 
float underline_position (void) const
 
FontMetricsunderline_position (float)
 
float underline_thickness (void) const
 
FontMetricsunderline_thickness (float)
 
float units_per_EM (void) const
 
FontMetricsunits_per_EM (float)
 

Detailed Description

Represents various metric values global to an entire font.

Definition at line 34 of file font_metrics.hpp.

Constructor & Destructor Documentation

◆ FontMetrics() [1/2]

fastuidraw::FontMetrics::FontMetrics ( void  )

Ctor. Initializes all fields as zero.

◆ FontMetrics() [2/2]

fastuidraw::FontMetrics::FontMetrics ( const FontMetrics obj)

Copy ctor.

Parameters
objvaue from which to copy

Member Function Documentation

◆ ascender() [1/2]

float fastuidraw::FontMetrics::ascender ( void  ) const

The typographical ascender value for the font in font units; this is essentially the maximum across all glyphs of the distance from the baseline to top of the glyph.

◆ ascender() [2/2]

FontMetrics& fastuidraw::FontMetrics::ascender ( float  )

Set the value returned by ascender(void) const

◆ descender() [1/2]

float fastuidraw::FontMetrics::descender ( void  ) const

The typographical descender value for the font in font units; this is essentially the minumum across all glyphs of the signed distance from the baseline to bottom of the glyph. A negative value indicates below the baseline and a positive value above the baseline.

◆ descender() [2/2]

FontMetrics& fastuidraw::FontMetrics::descender ( float  )

Set the value returned by descender(void) const

◆ height() [1/2]

float fastuidraw::FontMetrics::height ( void  ) const

The recommended distance, in font units, between lines of text. This is typically greater than the difference between ascender() and descender().

◆ height() [2/2]

FontMetrics& fastuidraw::FontMetrics::height ( float  )

Set the value returned by height(void) const

◆ operator=()

FontMetrics& fastuidraw::FontMetrics::operator= ( const FontMetrics obj)

assignment operator

Parameters
objvalue from which to assign

◆ strikeout_position() [1/2]

float fastuidraw::FontMetrics::strikeout_position ( void  ) const

Returns the strike-through position.

◆ strikeout_position() [2/2]

FontMetrics& fastuidraw::FontMetrics::strikeout_position ( float  )

Set the value returned by strikeout_position(void) const

◆ strikeout_thickness() [1/2]

float fastuidraw::FontMetrics::strikeout_thickness ( void  ) const

Returns the strike-through thickness.

◆ strikeout_thickness() [2/2]

FontMetrics& fastuidraw::FontMetrics::strikeout_thickness ( float  )

Set the value returned by strikeout_thickness(void) const

◆ swap()

void fastuidraw::FontMetrics::swap ( FontMetrics obj)

Swap operation

Parameters
objobject with which to swap

◆ underline_position() [1/2]

float fastuidraw::FontMetrics::underline_position ( void  ) const

Returns the underline position.

◆ underline_position() [2/2]

FontMetrics& fastuidraw::FontMetrics::underline_position ( float  )

Set the value returned by underline_position(void) const

◆ underline_thickness() [1/2]

float fastuidraw::FontMetrics::underline_thickness ( void  ) const

Returns the underline thickness.

◆ underline_thickness() [2/2]

FontMetrics& fastuidraw::FontMetrics::underline_thickness ( float  )

Set the value returned by underline_thickness(void) const

◆ units_per_EM() [1/2]

float fastuidraw::FontMetrics::units_per_EM ( void  ) const

The number of font units per EM for the glyph. The conversion from font coordinates to pixel coordiantes is given by: $PixelCoordinates = FontCoordinates * PixelSize / units_per_EM$

◆ units_per_EM() [2/2]

FontMetrics& fastuidraw::FontMetrics::units_per_EM ( float  )

Set the value returned by units_per_EM(void) const


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