![]() |
wxMaxima
|
#include <TextStyle.h>
Public Member Functions | |
AFontName (const wxString &fontName) | |
AFontName (const AFontName &o) | |
operator const wxString & () const | |
bool | operator== (const AFontName &o) const |
bool | operator< (const AFontName &o) const |
bool | empty () const |
AFontName & | operator= (const AFontName &o) |
AFontName & | Set (const wxString &str) |
const wxString & | GetAsString () const |
Static Public Member Functions | |
static AFontName | Linux_Libertine_O () |
static AFontName | Linux_Libertine_G () |
static AFontName | Linux_Libertine () |
static AFontName | Times_New_Roman () |
static AFontName | Monaco () |
static AFontName | Arial () |
static AFontName | Symbol () |
static AFontName | CMEX10 () |
static AFontName | CMSY10 () |
static AFontName | CMR10 () |
static AFontName | CMMI10 () |
static AFontName | CMTI10 () |
Friends | |
class | FontCache |
struct | std::hash< AFontName > |
An interned font face name, very quick to compare and hash.
Any given face name is only stored in memory once, and further comparisons and hashing are based on the pointer to the underlying unique string. There is no reference counting: the interned strings persist until the application exits. This is acceptable, since there is a limited number of fonts available in any system, and the size of the interned face name table will not grow without bounds. The interning mechanism, however, does not have a fixed upper limit to the number of interned strings.
This class is thread-safe with respect to its access to the shared instance of the interner.
|
inlineexplicit |
Constructs a font name by interning the name string The constructor is explicit because this requires a string lookup in the intern table. The font names should be constructed once for any given name, and then used instead of the string.