#include <Font.h>
Graphic::Font::Font |
( |
const WString & |
fileName, |
|
|
int |
pixSize |
|
) |
| |
constructor that take a filename of a font file (ttf, ttc, cff...)
- Parameters
-
fileName | Path to the file to open |
pixSize | Size of the loaded font. |
Graphic::Font::Font |
( |
const char * |
fileDump, |
|
|
size_t |
fileSize |
|
) |
| |
Constructor using a font file dump and his size in bytes.
- Parameters
-
fileDump | memory copy of a font file. |
fileSize | size in bytes of the data buffer. |
Graphic::Font::Font |
( |
ctor |
| ) |
|
|
protected |
void Graphic::Font::_loadFreeType |
( |
const char * |
fileDump, |
|
|
size_t |
size |
|
) |
| |
|
protected |
bool Graphic::Font::_read |
( |
std::fstream * |
fileStream | ) |
|
|
protected |
void Graphic::Font::_setPixSize |
( |
unsigned int |
size | ) |
|
|
protected |
void Graphic::Font::_unload |
( |
| ) |
|
|
protected |
compute the rectangle of a text using this font.
- Parameters
-
float Graphic::Font::getLineHeight |
( |
| ) |
const |
get the line height of this font.
- Returns
- line height
float Graphic::Font::getWordSpace |
( |
| ) |
const |
get the word space of this font
- Returns
- word space
load a glyph on this
- Returns
- const pointer of the character just created (NULL if nothing was loaded)
void Graphic::Font::loadGlyph |
( |
const UTF8String & |
str | ) |
|
load all the glyph present inside the string
bool Graphic::Font::read |
( |
std::fstream * |
fileStream | ) |
|
read from a file stream
- Parameters
-
fileStream | stream used to read load this object |
- Returns
- boolean to know if the operation is a success of not.
bool Graphic::Font::write |
( |
std::fstream * |
fileStream | ) |
const |
write this object as binary into a file stream
- Parameters
-
fileStream | stream used to write this object |
- Returns
- boolean to know if the operation is a success of not.
FT_Face Graphic::Font::ftFace |
|
protected |
FT_Library Graphic::Font::ftLib |
|
protected |
float Graphic::Font::lineHeight |
|
protected |
char* Graphic::Font::memoryFontObject |
|
protected |
size_t Graphic::Font::memorySize |
|
protected |
float Graphic::Font::pixSize |
|
protected |
float Graphic::Font::wordSpace |
|
protected |
The documentation for this class was generated from the following files: