Overview
Examples
Screenshots
Comparisons
Applications
Download
Manual
Status & Roadmap
FAQ
Authors & License
Forums
Wiki
Funding Ultimate++
Search on this site









SourceForge.net Logo



class FontInfo : private Moveable<FontInfo

Provides text metrics for given Font. This is read-only class with cheap deep copy operations (internally uses reference counting and quite complicated system of sharing and caching).

 

int GetAscent() const

Returns the character cell extend above the baseline.

 

int GetDescent() const

Returns the character cell extend below the baseline.

 

int GetExternal() const

Returns the additional space that font description recommends to insert between two lines of text. Rarely used.

 

int GetInternal() const

Returns the mostly free space inside GetAscent value. Rarely used.

 

int GetHeight() const

Returns GetAscent() + GetDescent() - the height of the line of text.

 

int GetLineHeight() const

Returns GetHeight() + GetExternal().

 

int GetAveWidth() const

Returns the average width of character.

 

int GetMaxWidth() const

Returns the maximal width of character.

 

int GetWidth(int cconst

Returns the total advance with of character c (encoded in unicode).

 

int operator[](int cconst

Same as GetWidth(c).

 

int GetLeftSpace(int cconst

Describes the relation of left side of character cell and leftmost area painted for character c. Negative value means that character extends character cell, positive value means that there is a space inside the cell not used for glyph.

 

int GetRightSpace(int cconst

Similar to GetLeftSpace for the right edge of character cell.

 

int GetKerning(int c1, int c2const

Returns kerning defined in font description for the c1 c2 pair.

 

bool IsFixedPitch() const

True if font is mono-spaced.

 

bool IsScaleable() const

True if font is freely scaleable.

 

Font GetFont() const

Returns the Font used to obtain this FontInfo.

 

int GetFontHeight() const

Returns the font height from the Font used to obtain this FontInfo.  

 

String GetFileName() const

X11 platform specific. Returns the path to file with font description.

 

FontInfo(const FontInfof)

Copy constructor (cheap).

 

FontInfooperator=(const FontInfof)

Assignment operator (cheap).

 

FontInfo()

Constructs empty FontInfo.