wxArt2D
|
Public Member Functions | |
virtual a2dFontType | GetType (void) const |
a2dFontDcData (const wxFont &font=wxNullFont, double size=0.0) | |
Constructor. More... | |
a2dFontDcData (double size, int family, int style=wxNORMAL, int weight=wxNORMAL, const bool underline=false, const wxString &faceName=wxT(""), wxFontEncoding encoding=wxFONTENCODING_DEFAULT) | |
Constructor. More... | |
a2dFontDcData (const a2dFontDcData &other) | |
Copy constructor. | |
virtual | ~a2dFontDcData () |
Destructor. | |
void | SetFont (const wxFont &font) |
Set font format. More... | |
wxFont & | GetFont (void) |
Get the font format. More... | |
wxString | FindFileName () const |
Find the filename of the current font. 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... | |
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 |
bool | GetVpath (wxChar c, a2dVpath &glyph, const a2dAffineMatrix &affine=a2dIDENTITY_MATRIX) |
void | SetSize (double size) |
a2dFont | GetFreetypeFont () |
Get the freetype equivalent of the font. | |
![]() | |
a2dFontRefData (double size) | |
a2dFontRefData () | |
constructor | |
a2dFontRefData (const a2dFontRefData &other) | |
bool | Ok () |
double | GetSize () const |
double | GetDescent () const |
double | GetLineHeight () const |
Static Public Member Functions | |
static void | GetInfoList (a2dFontInfoList &list) |
static a2dFontDcData * | CreateFont (const a2dFontInfo &info, bool force=false) |
Protected Attributes | |
double | m_sizeInPixels |
current text drawn its size in pixels to do proper hinting. | |
wxFont | m_font |
Font. | |
double * | m_widthcache |
Width cache normalized to a font height of 1. This stores the 'normal' part of the alphabet. | |
DcWidthHash | m_extwidthcache |
Width cache normalized to a font height of 1. This stores the extended characters. | |
DcKerningHash | m_kerningcache |
Kerning cache normalized to a font height of 1. | |
a2dFont | m_freetypefont |
freetype equivalent of the font, used in AggDrawer. | |
![]() | |
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 304 of file stylebase.cpp.
a2dFontDcData::a2dFontDcData | ( | const wxFont & | font = wxNullFont , |
double | size = 0.0 |
||
) |
Constructor.
font | Font format. The size of the font is not used and should be set using the next parameter. |
size | Size in world coordinates. |
Definition at line 439 of file stylebase.cpp.
a2dFontDcData::a2dFontDcData | ( | double | size, |
int | family, | ||
int | style = wxNORMAL , |
||
int | weight = wxNORMAL , |
||
const bool | underline = false , |
||
const wxString & | faceName = wxT( "" ) , |
||
wxFontEncoding | encoding = wxFONTENCODING_DEFAULT |
||
) |
Constructor.
Creates a font object (see font encoding overview, in the wxWidgets documentation, for the meaning of the last parameter).
size | Size in world coordinates. |
family | Font family, a generic way of referring to fonts without specifying actual facename. One of:
|
style | One of wxNORMAL, wxSLANT and wxITALIC. |
weight | One of wxNORMAL, wxLIGHT and wxBOLD. |
underline | The value can be true or false. At present this has an effect on Windows and Motif 2.x only. |
faceName | An optional string specifying the actual typeface to be used. If the empty string, a default typeface will chosen based on the family. |
encoding | An encoding which may be one of
|
If the specified encoding isn't available, no font is created.
wxFONTENCODING_DEFAULT is the encoding set by calls to SetDefaultEncoding and which may be set to, say, KOI8 to create all fonts by default with KOI8 encoding. Initially, the default application encoding is the same as default system encoding.
Definition at line 451 of file stylebase.cpp.
wxString a2dFontDcData::FindFileName | ( | ) | const |
Find the filename of the current font.
Currently only implemented for Windows.
Definition at line 662 of file stylebase.cpp.
|
inline |
Get the font format.
Definition at line 367 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 722 of file stylebase.cpp.
void a2dFontDcData::SetFont | ( | const wxFont & | font | ) |
Set font format.
font | The font information. The size of the font is not used. |
Definition at line 504 of file stylebase.cpp.