|
wxArt2D
|
Freetype font class. More...
#include <artbase/stylebase.h>


Public Member Functions | |
| virtual a2dFontType | GetType (void) const |
| a2dFontFreetypeData (const wxString &filename=wxT(""), double size=0.0, wxFontEncoding encoding=wxFONTENCODING_DEFAULT, int faceindex=0) | |
| Constructor. More... | |
| a2dFontFreetypeData (const a2dFontFreetypeData &other) | |
| Copy constructor. | |
| virtual | ~a2dFontFreetypeData () |
| Destructor. | |
| void | SetFilename (const wxString &filename) |
| Set the font filename and load the font. More... | |
| wxString | GetFilename (bool filenameonly=false) const |
| Get the font filename. More... | |
| void | SetEncodingConverter (wxEncodingConverter *converter) |
| const a2dGlyph * | GetGlyph (wxChar c) const |
| Get the glyph of a single character. More... | |
| void | SetDeviceHeight (double sizeInPixels) |
| to set for load glyph from face, to do proper hinting | |
| double | GetDeviceHeight () |
| void | GetTextExtent (const wxString &string, double &w, double &h, double &descent, double &externalLeading) const |
| double | GetWidth (wxChar c) const |
| Get width of a single character. | |
| double | GetGlyphHeight (wxChar c) const |
| double | GetKerning (wxChar c1, wxChar c2) const |
| Get kerning space between two characters. More... | |
| bool | GetVpath (wxChar c, a2dVpath &glyph, const a2dAffineMatrix &affine=a2dIDENTITY_MATRIX) |
Public Member Functions inherited from a2dFontRefData | |
| a2dFontRefData (double size) | |
| a2dFontRefData () | |
| constructor | |
| a2dFontRefData (const a2dFontRefData &other) | |
| bool | Ok () |
| virtual void | SetSize (double size) |
| double | GetSize () const |
| double | GetDescent () const |
| double | GetLineHeight () const |
Static Public Member Functions | |
| static void | GetInfoList (a2dFontInfoList &list) |
| static a2dFontFreetypeData * | CreateFont (const a2dFontInfo &info, bool force=false) |
| static void | SetLoadFlags (wxInt32 loadMethodMask) |
Protected Types | |
| typedef vector< a2dGlyph > | a2dGlyphCache |
| Glyph Cache. This stores the 'normal' part of the alphabet. | |
Protected Member Functions | |
| void | ClearCacheLinkes (void) |
Protected Attributes | |
| wxString | m_filename |
| Filename of the vector font. | |
| a2dGlyphCache | m_glyphcache |
| a2dGlyphHash | m_extglyphcache |
| Glyph cache. This stores the extended characters. | |
| wxChar | m_lastChar |
| last character for glyph cache one character | |
| a2dGlyph * | m_a2dLastGlyph |
| Glyph cache one last character. | |
| FT_Face | m_face |
| freetypelib face struct. | |
| wxFontEncoding | m_encoding |
| encoding setting | |
| double | m_sizeInPixels |
| current text drawn its size in pixels to do proper hinting. | |
| long | m_faceindex |
| what font with index to load from file | |
| wxEncodingConverter * | m_converter |
| encoding converter | |
Protected Attributes inherited from a2dFontRefData | |
| a2dFontInfo | m_fontinfo |
| Font info. | |
| double | m_height |
| Font height cache normalized to a font height of 1. | |
| double | m_desc |
| Font descender cache normalized to a font height of 1. | |
| double | m_lead |
| Font external leading normalized to a font height of 1. | |
| bool | m_ok |
| True if a valid font is set. | |
Static Protected Attributes | |
| static wxInt32 | m_loadMethodMask = a2dFont::a2d_LOAD_DEFAULT |
Friends | |
| class | a2dFont |
Freetype font class.
Definition at line 940 of file stylebase.cpp.
| a2dFontFreetypeData::a2dFontFreetypeData | ( | const wxString & | filename = wxT( "" ), |
| double | size = 0.0, |
||
| wxFontEncoding | encoding = wxFONTENCODING_DEFAULT, |
||
| int | faceindex = 0 |
||
| ) |
Constructor.
\param filename Filename of the vector font. \param size Size in world coordinates.
| encoding | endocing of font |
Definition at line 1062 of file stylebase.cpp.
| wxString a2dFontFreetypeData::GetFilename | ( | bool | filenameonly = false | ) | const |
Get the font filename.
| filenameonly | The returned filename will be stripped of drive-letters and directories. |
Definition at line 1233 of file stylebase.cpp.
| const a2dGlyph * a2dFontFreetypeData::GetGlyph | ( | wxChar | c | ) | const |
Get the glyph of a single character.
Definition at line 1359 of file stylebase.cpp.
|
virtual |
Get kerning space between two characters.
Kerning is a method, which moves characters closer together/further apart, to improve the look of the font. Eg. the letter combination LT will be moved closer together. The return value is negative or positive, to respectively move characters closer together, or further apart.
Reimplemented from a2dFontRefData.
Definition at line 1614 of file stylebase.cpp.
| void a2dFontFreetypeData::SetFilename | ( | const wxString & | filename | ) |
Set the font filename and load the font.
| filename | The filename of the font. This may either be a full path, or just the fontname. In the latter case, the fontpath of a2dGlobals will be used to search the font. |
Definition at line 1267 of file stylebase.cpp.
|
inlinestatic |
Set the way glyphs are loaded by freetype. Important for small fonts. a2d_LOAD_DEFAULT; a2d_LOAD_DEFAULT | a2d_LOAD_NO_HINTING; a2d_LOAD_DEFAULT | a2d_LOAD_FORCE_AUTOHINT;
Definition at line 1018 of file stylebase.cpp.