#include <freetypefontfile.h>
It supports both bitmap and scalable formats, including TrueType, OpenType, Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. Uses high-speed anti-aliased glyph bitmap generation with 256 gray levels.
Public Member Functions | |
FreeTypeFontFile () | |
virtual | ~FreeTypeFontFile () |
virtual bool | Open (bool write=false) |
virtual void | Close () |
virtual ulong_t | LoadData () |
virtual byte_t * | GetData (ulong_t char_code, bool close=false) |
Protected Attributes | |
FT_Library | library |
FreeType library. | |
FT_Face | face |
FreeType font face. | |
FT_Byte * | buffer |
Buffer for image data. |
FreeTypeFontFile::FreeTypeFontFile | ( | ) |
Constructor.
FreeTypeFontFile::~FreeTypeFontFile | ( | ) | [virtual] |
Destructor. Closes opened file.
bool FreeTypeFontFile::Open | ( | bool | write = false |
) | [virtual] |
void FreeTypeFontFile::Close | ( | ) | [virtual] |
ulong_t FreeTypeFontFile::LoadData | ( | ) | [virtual] |
Loads font data from opened file.
Whole file is loaded into memory buffer first.
Reimplemented from DataFile.
Returns bitmap of one character.
char_code | Code of wanted character. | |
close | Whether file will be closed after returning the data. |
Reimplemented from FontFile.
FT_Library FreeTypeFontFile::library [protected] |
FreeType library.
FT_Face FreeTypeFontFile::face [protected] |
FreeType font face.
FT_Byte* FreeTypeFontFile::buffer [protected] |
Buffer for image data.