VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Loading...
Searching...
No Matches
Public Member Functions | List of all members
CFontDesc Class Reference

font class More...

`#include <cfont.h>`

Inheritance diagram for CFontDesc:

## Public Member Functions
| CFontDesc (const UTF8String &name="", const CCoord &size=0, const int32_t style=0)
| CFontDesc (const CFontDesc &font)
| ~CFontDesc () noexcept override
Public Member Functions inherited from ReferenceCounted< std::atomic< int32_t > >
| ReferenceCounted ()=default
virtual | ~ReferenceCounted () noexcept=default
| ReferenceCounted (const ReferenceCounted &)
ReferenceCounted & | operator= (const ReferenceCounted &)
| ReferenceCounted ()=default
| ReferenceCounted (const ReferenceCounted &)
virtual | ~ReferenceCounted () noexcept=default
ReferenceCounted & | operator= (const ReferenceCounted &)
void | forget () override
| decrease refcount and delete object if refcount == 0
void | remember () override
| increase refcount
virtual int32_t | getNbReference () const
| get refcount
void | forget () override
| decrease refcount and delete object if refcount == 0
void | remember () override
| increase refcount
virtual int32_t | getNbReference () const
| get refcount

## Size, Name and Style Methods
UTF8String | name
CCoord | size
int32_t | style
PlatformFontPtr | platformFont
const UTF8String & | getName () const
| get the name of the font
const CCoord & | getSize () const
| get the height of the font
const int32_t & | getStyle () const
| get the style of the font
virtual void | setName (const UTF8String &newName)
| set the name of the font
virtual void | setSize (CCoord newSize)
| set the height of the font
virtual void | setStyle (int32_t newStyle)
| set the style of the font
virtual const PlatformFontPtr | getPlatformFont () const
virtual const IFontPainter * | getFontPainter () const
virtual CFontDesc & | operator= (const CFontDesc &)
virtual bool | operator== (const CFontDesc &) const
virtual bool | operator!= (const CFontDesc &other) const
static void | init ()
static void | cleanup ()
void | beforeDelete () override
virtual void | freePlatformFont ()

## Detailed Description

font class

The CFontDesc class replaces the old font handling. You have now the possibilty to use whatever font you like as long as it is available on the system. You should cache your own CFontDesc as this speeds up drawing on some systems.

Note
  New in 4.9: It's now possible to use custom fonts. Fonts must reside inside the Bundle/Package at PackageRoot/Resources/Fonts/.

## Constructor & Destructor Documentation

## ◆ CFontDesc() [1/2]

CFontDesc | ( | const UTF8String & | name = "",
|  | const CCoord & | size = 0,
|  | const int32_t | style = 0 )

## ◆ CFontDesc() [2/2]

CFontDesc | ( | const CFontDesc & | font | ) |

## ◆ ~CFontDesc()

~CFontDesc | ( |  | ) |
| override noexcept

## Member Function Documentation

## ◆ beforeDelete()

void beforeDelete | ( |  | ) |
| override protected virtual

Reimplemented from ReferenceCounted< std::atomic< int32_t > >.

## ◆ cleanup()

void cleanup | ( |  | ) |
| static

## ◆ freePlatformFont()

void freePlatformFont | ( |  | ) |
| protected virtual

## ◆ getFontPainter()

const IFontPainter * getFontPainter | ( |  | ) | const
| virtual

## ◆ getName()

const UTF8String & getName | ( |  | ) | const
| inline

get the name of the font

## ◆ getPlatformFont()

auto getPlatformFont | ( |  | ) | const
| virtual

## ◆ getSize()

const CCoord & getSize | ( |  | ) | const
| inline

get the height of the font

## ◆ getStyle()

const int32_t & getStyle | ( |  | ) | const
| inline

get the style of the font

## ◆ init()

void init | ( |  | ) |
| static

## ◆ operator!=()

virtual bool operator!= | ( | const CFontDesc & | other | ) | const
| inline virtual

## ◆ operator=()

CFontDesc & operator= | ( | const CFontDesc & | f | ) |
| virtual

## ◆ operator==()

bool operator== | ( | const CFontDesc & | f | ) | const
| virtual

## ◆ setName()

void setName | ( | const UTF8String & | newName | ) |
| virtual

set the name of the font

## ◆ setSize()

void setSize | ( | CCoord | newSize | ) |
| virtual

set the height of the font

## ◆ setStyle()

void setStyle | ( | int32_t | newStyle | ) |
| virtual

set the style of the font

See also
  CTxtFace

## Member Data Documentation

## ◆ name

UTF8String name
| protected

## ◆ platformFont

PlatformFontPtr platformFont
| mutable protected

## ◆ size

CCoord size
| protected

## ◆ style

int32_t style
| protected

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

- cfont.h
- cfont.cpp