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

Public Types

enum  FontEncoding_e {
  ASCII ,
  UNICODE ,
  RUNTIME
}
 

Public Member Functions

 Font (str family, str style, int ptSize, bool isUnicode=false)
 
 Font (str family, str style, int ptSize, FontEncoding_e encoding)
 
bool operator== (Font &rhs)
 
bool operator!= (Font &rhs)
 
str GetFamily ()
 
str GetStyle ()
 
int GetPtSize ()
 
None SetFamily (str family)
 
None SetStyle (str style)
 
None SetPtSize (int ptSize)
 
str GetKey ()
 
bool IsUnicode ()
 
bool IsRuntime ()
 
list GetGlyphRanges ()
 

Public Attributes

 GetGlyphRanges
 

Detailed Description

Python extension for the Font editor class.

Member Enumeration Documentation

◆ FontEncoding_e

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() [1/2]

Font::Font ( str  family,
str  style,
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() [2/2]

Font::Font ( str  family,
str  style,
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

◆ GetFamily()

str Font::GetFamily ( )

Retrieves the font's family name.

Returns
str containing the font's family name

◆ GetGlyphRanges()

list Font::GetGlyphRanges ( )

Retrieve a vector of the glyph ranges for this font.

Returns
vector of pair of unsigned shorts representing ranges of values

◆ GetKey()

str Font::GetKey ( )

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

Returns
str containing the font's key information

◆ GetPtSize()

int Font::GetPtSize ( )

Retrieves the font's point size.

Returns
int containing the font's point size

◆ GetStyle()

str Font::GetStyle ( )

Retrieves the font's style name.

Returns
str containing the font's style name

◆ IsRuntime()

bool Font::IsRuntime ( )

Is the font Runtime or not?

Returns
boolean true if the font is Runtime, false if not
Since
GL Studio 6.0.1

◆ IsUnicode()

bool Font::IsUnicode ( )

Is the font Unicode or not?

Returns
boolean true if the font is Unicode, false if not

◆ operator!=()

bool Font::operator!= ( Font rhs)

inequality operator

Parameters
rhsinstance to compare

◆ operator==()

bool Font::operator== ( Font rhs)

equality operator

Parameters
rhsinstance to compare

◆ SetFamily()

None Font::SetFamily ( str  family)

Sets the font's family name.

Parameters
familyNew font family name

◆ SetPtSize()

None Font::SetPtSize ( int  ptSize)

Sets the font's point size.

Parameters
ptSizeNew font point size

◆ SetStyle()

None Font::SetStyle ( str  style)

Sets the font's style name.

Parameters
styleNew font style name

Member Data Documentation

◆ GetGlyphRanges

Font::GetGlyphRanges

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