ofDoc > graphics > ofTrueTypeFont

ofTrueTypeFontfile

The ofTrueTypeFont class provides an interface to load fonts into openFrameworks. The fonts are converted to textures, and can be drawn on screen. There are some options when you load the font - what size the font is rendered at, whether or not it is anti-aliased, and whether the font object will be the full character set or a subset (i.e., extended ASCII, which can include diacritics like umlauts, or ASCII). The default is anti-aliased, non-full character set. The library uses freetype, which has certain patent problems in regards to true type hinting, especially at small sizes, so non-anti-aliased type doesn't always render beautifully. But we find it quite adequate, and at larger sizes it seems to works well.

Fonts

OF_TTF_SANS variable
OF_TTF_SERIF variable
OF_TTF_MONO variable

ofTrueTypeFontclass

Load Font

load ()
loadFont () Use load instead

Font Settings

Font Size

getSize ()

Drawing

bind ()
unbind ()

Functions

Friends