freetype - oxygine/oxygine-framework GitHub Wiki

FreeType

repository https://github.com/oxygine/oxygine-freetype

1. include header

#include "ResFontFT.h"

2. initialize

ResFontFT::initLibrary();

3. declare your font in resources.xml

<ftfont file="verdana.ttf" />

4. use

ResFont *font = resources.getResFont("verdana");

spTextField text = new TextField();
text->attachTo(getStage());
text->setFont(font);
text->setFontSize(30);
text->setText("Hello World!");

5. release

ResFontFT::freeLibrary();