|
Public Types |
| | TabWidthInSpaces = 3 |
| | TextureSheetSize = 256 |
| enum | Constants {
TabWidthInSpaces = 3,
TextureSheetSize = 256
} |
Public Member Functions |
| | GFont () |
| virtual | ~GFont () |
| GFXTexHandle | getTextureHandle (S32 index) const |
| const PlatformFont::CharInfo & | getCharInfo (const UTF16 in_charIndex) |
| U32 | getCharHeight (const UTF16 in_charIndex) |
| U32 | getCharWidth (const UTF16 in_charIndex) |
| U32 | getCharXIncrement (const UTF16 in_charIndex) |
| bool | isValidChar (const UTF16 in_charIndex) const |
| const U32 | getHeight () const |
| const U32 | getBaseline () const |
| const U32 | getAscent () const |
| const U32 | getDescent () const |
| U32 | getBreakPos (const UTF16 *string, U32 strlen, U32 width, bool breakOnWhitespace) |
| U32 | getStrNWidth (const UTF16 *, U32 n) |
| | These are the preferred width functions.
|
| U32 | getStrNWidthPrecise (const UTF16 *, U32 n) |
| U32 | getStrWidth (const UTF8 *) |
| | These UTF8 versions of the width functions will be deprecated, please avoid them.
|
| U32 | getStrNWidth (const UTF8 *, U32 n) |
| U32 | getStrWidthPrecise (const UTF8 *) |
| U32 | getStrNWidthPrecise (const UTF8 *, U32 n) |
| void | wrapString (const UTF8 *string, U32 width, Vector< U32 > &startLineOffset, Vector< U32 > &lineLen) |
| void | dumpInfo () const |
| | Dump information about this font to the console.
|
| void | exportStrip (const char *fileName, U32 padding, U32 kerning) |
| | Export to an image strip for image processing.
|
| void | importStrip (const char *fileName, U32 padding, U32 kerning) |
| | Import an image strip generated with exportStrip, make sure parameters match!
|
| void | setPlatformFont (PlatformFont *inPlatformFont) |
| const bool | hasPlatformFont () const |
| | Query as to presence of platform font.
|
| bool | isAlphaOnly () const |
| | Query to determine if we should use add or modulate (as A8 textures are treated as having 0 for RGB).
|
| String | getFontFaceName () const |
| | Get the face name of the font.
|
| U32 | getFontSize () const |
| U32 | getFontCharSet () const |
| bool | read (Stream &io_rStream) |
| bool | write (Stream &io_rStream) |
Static Public Member Functions |
| static Resource< GFont > | create (const String &faceName, U32 size, const char *cacheDirectory, U32 charset=TGE_ANSI_CHARSET) |
| static const PlatformFont::CharInfo & | getDefaultCharInfo () |
| static String | getFontCacheFilename (const String &faceName, U32 faceSize) |
| | Get the filename for a cached font.
|
| static GFont * | load (const Torque::Path &path) |
Protected Member Functions |
| bool | loadCharInfo (const UTF16 ch) |
| void | addBitmap (PlatformFont::CharInfo &charInfo) |
| void | addSheet (void) |
| void | assignSheet (S32 sheetNum, GBitmap *bmp) |
Protected Attributes |
| void * | mMutex |
Private Attributes |
| PlatformFont * | mPlatformFont |
| Vector< GFXTexHandle > | mTextureSheets |
| S32 | mCurX |
| S32 | mCurY |
| S32 | mCurSheet |
| bool | mNeedSave |
| Torque::Path | mGFTFile |
| String | mFaceName |
| U32 | mSize |
| U32 | mCharSet |
| U32 | mHeight |
| U32 | mBaseline |
| U32 | mAscent |
| U32 | mDescent |
| Vector< PlatformFont::CharInfo > | mCharInfoList |
| | List of character info structures, must be accessed through the getCharInfo(U32) function to account for remapping.
|
| S32 | mRemapTable [65536] |
| | Index remapping.
|
Static Private Attributes |
| static const U32 | csm_fileVersion |