| Python Script Engine 8.3 GL Studio Editor Python Script API

Public Types | Public Member Functions | Public Attributes | List of all members
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 ()
String | GetStyle ()
unsigned int | GetPtSize ()
void | SetFamily (String family)
void | SetStyle (String style)
void | SetPtSize (unsigned int ptSize)
String | GetKey ()
bool | IsUnicode ()
bool | IsRuntime ()
std::vector< GlyphRange > | GetGlyphRanges ()

## Public Attributes
newobject | GetGlyphRanges

## Detailed Description

Python extension for the Font editor class.

## Member Enumeration Documentation

## ◆ FontEncoding_e

enum Font::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 | ( | String | family,
|  | String | style,
|  | unsigned int | ptSize,
|  | bool | isUnicode = `false`
| ) |  |

Creates a font with the given information set.

Parameters

  family | font family
  style | font style
  ptSize | font point size
  isUnicode | [optional, default to false] whether this font is Unicode

## ◆ Font() [2/2]

Font::Font | ( | String | family,
|  | String | style,
|  | unsigned int | ptSize,
|  | FontEncoding_e | encoding
| ) |  |

Creates a font with the given information set.

Parameters

  family | font family
  style | font style
  ptSize | font point size
  encoding | [optional, default to ASCII] the encoding used for the font

Since
  GL Studio 6.0.1

## Member Function Documentation

## ◆ GetFamily()

String Font::GetFamily | ( |  | ) |

Retrieves the font's family name.

Returns
  String containing the font's family name

## ◆ GetGlyphRanges()

std::vector< GlyphRange > Font::GetGlyphRanges | ( |  | ) |

Retrieve a vector of the glyph ranges for this font.

Returns
  vector of pair of unsigned shorts representing ranges of values

## ◆ GetKey()

String Font::GetKey | ( |  | ) |

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

Returns
  String containing the font's key information

## ◆ GetPtSize()

unsigned int Font::GetPtSize | ( |  | ) |

Retrieves the font's point size.

Returns
  unsigned int containing the font's point size

## ◆ GetStyle()

String Font::GetStyle | ( |  | ) |

Retrieves the font's style name.

Returns
  String 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 | ) | const

inequality operator

Parameters

  rhs | instance to compare

## ◆ operator==()

bool Font::operator== | ( | Font & | rhs | ) | const

equality operator

Parameters

  rhs | instance to compare

## ◆ SetFamily()

void Font::SetFamily | ( | String | family | ) |

Sets the font's family name.

Parameters

  family | New font family name

## ◆ SetPtSize()

void Font::SetPtSize | ( | unsigned int | ptSize | ) |

Sets the font's point size.

Parameters

  ptSize | New font point size

## ◆ SetStyle()

void Font::SetStyle | ( | String | style | ) |

Sets the font's style name.

Parameters

  style | New font style name

## Member Data Documentation

## ◆ GetGlyphRanges

newobject Font::GetGlyphRanges

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

- Font.i