|
Public Types |
typedef std::vector< float > | size_list_t |
Public Member Functions |
| Font () |
| Default Constructor.
|
| Font (const Font &font) |
| Constructor.
|
| Font (const font_properties &sProps) |
| Constructor.
|
| Font (const String &cConfigName) |
| Constructor.
|
void | AddRef () |
| Adds a reference counter.
|
void | Release () |
| Releases all instances of a Font.
|
status_t | SetProperties (const font_properties &sProps) |
| Sets the properties of the Font.
|
status_t | SetProperties (const String &cConfigName) |
| Sets the properties of the Font.
|
status_t | SetProperties (float vSize, float vShear=0.0f, float vRotation=0.0f) |
| Sets the properties of the Font.
|
status_t | SetFamilyAndStyle (const char *pzFamily, const char *pzStyle) |
| Sets the family and style of the Font.
|
void | SetSize (float vSize) |
| Sets the size.
|
void | SetShear (float vShear) |
| Sets the shear.
|
void | SetRotation (float vRotation) |
| Sets the rotation.
|
void | SetSpacing (int nSpacing) |
| Sets the spacing of a font.
|
void | SetEncoding (int nEncoding) |
| Sets the encoding of the Font.
|
void | SetFace (uint16 nFace) |
| Sets the face of the Font.
|
void | SetFlags (uint32 nFlags) |
| Sets the flags for the Font.
|
String | GetStyle () const |
| Gets the Style of the Font.
|
String | GetFamily () const |
| Gets the family of the Font.
|
float | GetSize () const |
| Gets the size of the Font.
|
float | GetShear () const |
| Gets the shear of the Font.
|
float | GetRotation () const |
| Gets the rotation of the Font.
|
int | GetSpacing () const |
| Gets the spacing of the Font.
|
int | GetEncoding () const |
| Gets the encoding of the Font.
|
uint32 | GetFlags () const |
| Gets the flags passed to the font.
|
font_direction | GetDirection () const |
| Gets the direction of the Font.
|
void | GetTruncatedStrings (const char *stringArray[], int32 numStrings, uint32 mode, float width, char *resultArray[]) const |
| Get truncated strings.
|
float | GetStringWidth (const char *pzString, int nLength=-1) const |
| Gets the strings width.
|
float | GetStringWidth (const String &cString) const |
| Gets the strings width.
|
void | GetStringWidths (const char **apzStringArray, const int *anLengthArray, int nStringCount, float *avWidthArray) const |
| Gets multiple string widths.
|
Point | GetTextExtent (const char *pzString, int nLength=-1, uint32 nFlags=0, int nTargetWidth=-1) const |
| - Description:
|
Point | GetTextExtent (const String &cString, uint32 nFlags=0, int nTargetWidth=-1) const |
| - Description:
|
void | GetTextExtents (const char **apzStringArray, const int *anLengthArray, int nStringCount, Point *acExtentArray, uint32 nFlags, int nTargetWidth=-1) const |
| - Description:
|
int | GetStringLength (const char *pzString, float vWidth, bool bIncludeLast=false) const |
| Gets the length of a string.
|
int | GetStringLength (const char *pzString, int nLength, float vWidth, bool bIncludeLast=false) const |
| Gets the length of a string.
|
int | GetStringLength (const String &cString, float vWidth, bool bIncludeLast=false) const |
| Gets the length of a string.
|
void | GetStringLengths (const char **apzStringArray, const int *anLengthArray, int nStringCount, float vWidth, int anMaxLengthArray[], bool bIncludeLast=false) const |
| Gets the lengths of multiple strings.
|
void | GetHeight (font_height *psHeight) const |
| Gets the height of the Font.
|
std::vector< uint32 > | GetSupportedCharacters () const |
| Gets the supported characters of the Font.
|
int | GetFontID (void) const |
| Gets the Font handle ID.
|
bool | operator== (const Font &cOther) |
bool | operator!= (const Font &cOther) |
Font & | operator= (const Font &cOther) |
virtual size_t | GetFlattenedSize (void) const |
virtual status_t | Flatten (uint8 *pBuffer, size_t nSize) const |
virtual status_t | Unflatten (const uint8 *pBuffer) |
virtual int | GetType (void) const |
Static Public Member Functions |
static status_t | GetConfigNames (std::vector< String > *pcTable) |
| Get a list of default font names.
|
static status_t | GetDefaultFont (const String &cName, font_properties *psProps) |
| Get the properties of a default font.
|
static status_t | SetDefaultFont (const String &cName, const font_properties &sProps) |
| Set the properties of a default font.
|
static status_t | AddDefaultFont (const String &cName, const font_properties &sProps) |
| Add a default font, or modify one if it already exists.
|
static int | GetFamilyCount () |
| Get number of installed Font families.
|
static status_t | GetFamilyInfo (int nIndex, char *pzFamily) |
| Get the name of a given font family.
|
static int | GetStyleCount (const char *pzFamily) |
| Get number of styles in a given family.
|
static status_t | GetStyleInfo (const char *pzFamily, int nIndex, char *pzStyle, uint32 *pnFlags=NULL) |
| Get info about a given font style.
|
static status_t | GetBitmapSizes (const String &cFamily, const String &cStyle, size_list_t *pcList) |
static bool | Rescan () |
| Scans for new fonts.
|
Friends |
class | View |
Syllable primarily uses scalable TrueType Fonts but can also use various bitmap Fonts. When using TrueType Font's the glyphs will be scaled to the requested point-size, but when using bitmap Fonts the size will be "snapped" to the closest size supported by the Font.
When rendering TrueType Fonts, the glyphs have the ability to be antialiazed to improve the quality of the fonts. The view can either antialiaze against a fixed background color to maximize speed or against the background it is actually rendered at.