Python Script Engine  7.1
GL Studio Editor Python Script API
Font Class Reference

Public Types

enum  FontEncoding_e {
  ASCII,
  UNICODE,
  RUNTIME
}
 

Public Member Functions

 Font (String family, String style, unsigned int ptSize, bool isUnicode=false)
 
 Font (String family, String style, unsigned int ptSize, FontEncoding_e encoding)
 
bool operator== (Font &rhs) const
 
bool operator!= (Font &rhs) const
 
String GetFamily (void)
 
String GetStyle (void)
 
unsigned int GetPtSize (void)
 
void SetFamily (String family)
 
void SetStyle (String style)
 
void SetPtSize (unsigned int ptSize)
 
String GetKey (void)
 
bool IsUnicode (void)
 
bool IsRuntime (void)
 
std::vector< GlyphRangeGetGlyphRanges (void)
 

Public Attributes

newobject GetGlyphRanges
 

Detailed Description

Python extension for the Font editor class.

Member Enumeration Documentation

Enumerator
ASCII 

Declares the font is an ASCII font.

UNICODE 

Declares the font is an Unicode font.

RUNTIME 

Declares the font is a Runtime font.

Constructor & Destructor Documentation

Font::Font ( String  family,
String  style,
unsigned int  ptSize,
bool  isUnicode = false 
)

Creates a font with the given information set.

Parameters
familyfont family
stylefont style
ptSizefont point size
isUnicode[optional, default to false] whether this font is Unicode
Font::Font ( String  family,
String  style,
unsigned int  ptSize,
FontEncoding_e  encoding 
)

Creates a font with the given information set.

Parameters
familyfont family
stylefont style
ptSizefont point size
encoding[optional, default to ASCII] the encoding used for the font
Since
GL Studio 6.0.1

Member Function Documentation

String Font::GetFamily ( void  )

Retrieves the font's family name.

Returns
String containing the font's family name
std::vector< GlyphRange > Font::GetGlyphRanges ( void  )

Retrieve a vector of the glyph ranges for this font.

Returns
vector of pair of unsigned shorts representing ranges of values
String Font::GetKey ( void  )

Retrieves a String represenation of the font, used as a key in certain maps.

Returns
String containing the font's key information
unsigned int Font::GetPtSize ( void  )

Retrieves the font's point size.

Returns
unsigned int containing the font's point size
String Font::GetStyle ( void  )

Retrieves the font's style name.

Returns
String containing the font's style name
bool Font::IsRuntime ( void  )

Is the font Runtime or not?

Returns
boolean true if the font is Runtime, false if not
Since
GL Studio 6.0.1
bool Font::IsUnicode ( void  )

Is the font Unicode or not?

Returns
boolean true if the font is Unicode, false if not
bool Font::operator!= ( Font rhs) const

inequality operator

Parameters
rhsinstance to compare
bool Font::operator== ( Font rhs) const

equality operator

Parameters
rhsinstance to compare
void Font::SetFamily ( String  family)

Sets the font's family name.

Parameters
familyNew font family name
void Font::SetPtSize ( unsigned int  ptSize)

Sets the font's point size.

Parameters
ptSizeNew font point size
void Font::SetStyle ( String  style)

Sets the font's style name.

Parameters
styleNew font style name

Member Data Documentation

newobject Font::GetGlyphRanges

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