wxArt2D
|
Public Member Functions | |
virtual a2dFontType | GetType (void) const |
a2dFontStrokeData (const wxString &filename=wxT(""), double size=0.0, bool monoSpaced=false, double weight=0.0) | |
Constructor. More... | |
a2dFontStrokeData (const a2dFontStrokeData &other) | |
Copy constructor. | |
virtual | ~a2dFontStrokeData () |
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... | |
double | GetWeight () const |
Get the weight of the font. More... | |
void | SetWeight (double weight) |
Set the weight of the font. More... | |
void | SetWeight (const wxString &weight) |
Set the weight of the font, from a string. More... | |
double | GetWidth (wxChar c) const |
Get width of a single character. | |
double | GetKerning (wxChar c1, wxChar c2) const |
Get kerning space between two characters. More... | |
double | GetStrokeWidth () const |
Get stroke width. More... | |
a2dStrokeGlyph | GetGlyph (wxChar c) const |
Get the glyph of a single character. More... | |
virtual bool | GetVpath (wxChar c, a2dVpath &glyph, const a2dAffineMatrix &affine=a2dIDENTITY_MATRIX) |
![]() | |
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 |
virtual void | GetTextExtent (const wxString &string, double &w, double &h, double &descent, double &externalLeading) const |
Static Public Member Functions | |
static void | GetInfoList (a2dFontInfoList &list) |
static a2dFontStrokeData * | CreateFont (const a2dFontInfo &info, bool force=false) |
Protected Attributes | |
wxString | m_filename |
Filename of the font. | |
wxUint16 * | m_width |
Width storage. | |
a2dStrokeGlyph * | m_characters |
Glyph storage. | |
wxUint16 | m_beginchar |
First character in font. | |
wxUint16 | m_count |
Number of characters in font. | |
wxUint16 | m_intsize |
Font size in internal coordinates. | |
double | m_weight |
Font weight. | |
bool | m_monoSpaced |
![]() | |
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. | |
Friends | |
class | a2dFont |
Definition at line 2038 of file stylebase.cpp.
a2dFontStrokeData::a2dFontStrokeData | ( | const wxString & | filename = wxT( "" ) , |
double | size = 0.0 , |
||
bool | monoSpaced = false , |
||
double | weight = 0.0 |
||
) |
Constructor.
filename | Filename of the vector font. |
size | Size in world coordinates. |
monoSpaced | if true, all character will have eqaul distance |
Definition at line 2171 of file stylebase.cpp.
wxString a2dFontStrokeData::GetFilename | ( | bool | filenameonly = false | ) | const |
Get the font filename.
filenameonly | The returned filename will be stripped of drive-letters and directories. |
Definition at line 2213 of file stylebase.cpp.
a2dStrokeGlyph a2dFontStrokeData::GetGlyph | ( | wxChar | c | ) | const |
Get the glyph of a single character.
Definition at line 2504 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 2498 of file stylebase.cpp.
double a2dFontStrokeData::GetStrokeWidth | ( | ) | const |
Get stroke width.
Definition at line 2485 of file stylebase.cpp.
|
inline |
Get the weight of the font.
Definition at line 2074 of file stylebase.cpp.
void a2dFontStrokeData::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 2224 of file stylebase.cpp.
void a2dFontStrokeData::SetWeight | ( | double | weight | ) |
Set the weight of the font.
weight | The weight (in this case stroke width) in percentages of the font size. There are two exceptions. 0: Draws the font with a pen of 1 pixel wide. -1: Draws the font with a normalized pen, as the font-designer intended it. |
Definition at line 2419 of file stylebase.cpp.
void a2dFontStrokeData::SetWeight | ( | const wxString & | weight | ) |
Set the weight of the font, from a string.
weight | One of: "Normalized Pen", "Pixel pen" or a string starting with the width in percentages, ending with %. |
Definition at line 2435 of file stylebase.cpp.