Mount Fuji Engine  0.8b
Data Structures | Enumerations | Functions
Font Rendering

Provides a set of functions to perform text rendering tasks. More...

Data Structures

struct  MFFont
 Represents a Fuji Font. More...
 

Enumerations

enum  MFFontJustify {
  MFFontJustify_Top_Left, MFFontJustify_Top_Center, MFFontJustify_Top_Right, MFFontJustify_Top_Full,
  MFFontJustify_Center_Left, MFFontJustify_Center, MFFontJustify_Center_Right, MFFontJustify_Center_Full,
  MFFontJustify_Bottom_Left, MFFontJustify_Bottom_Center, MFFontJustify_Bottom_Right, MFFontJustify_Bottom_Full,
  MFFontJustify_Max, MFFontJustify_ForceInt = 0x7FFFFFFF
}
 Font Justification. More...
 

Functions

MF_API MFFont * MFFont_Create (const char *pFilename)
 Create a font. More...
 
MF_API void MFFont_Destroy (MFFont *pFont)
 Destroy a font. More...
 
MF_API float MFFont_GetFontHeight (MFFont *pFont)
 Get the height of a font. More...
 
MF_API float MFFont_GetCharacterWidth (MFFont *pFont, int character)
 Get the width of a character. More...
 
MF_API MFVector MFFont_GetCharPos (MFFont *pFont, const char *pText, int charIndex, float height)
 Get the character offset into a string. More...
 
MF_API float MFFont_GetStringWidth (MFFont *pFont, const char *pText, float height, float lineWidth=0.0f, int maxLen=-1, float *pTotalHeight=NULL)
 Get the physical width of a string. More...
 
MF_API int MFFont_BlitText (MFFont *pFont, int x, int y, const MFVector &colour, const char *pText, int maxChars=-1)
 Blit a string to the screen. More...
 
MF_API int MFFont_BlitTextf (MFFont *pFont, int x, int y, const MFVector &colour, const char *pFormat,...) MFPRINTF_FUNC(5
 Blit a formatted string to the screen. More...
 
MF_API int MF_API float MFFont_DrawText (MFFont *pFont, const MFVector &pos, float height, const MFVector &colour, const char *pText, int maxChars=-1, const MFMatrix &ltw=MFMatrix::identity)
 Render a string. More...
 
MF_API float MFFont_DrawText2 (MFFont *pFont, float x, float y, float height, const MFVector &colour, const char *pText, int maxChars=-1, const MFMatrix &ltw=MFMatrix::identity)
 Render a string. More...
 
MF_API float MFFont_DrawTextf (MFFont *pFont, const MFVector &pos, float height, const MFVector &colour, const char *pFormat,...) MFPRINTF_FUNC(5
 Render a formatted string. More...
 
MF_API float MF_API float MFFont_DrawText2f (MFFont *pFont, float x, float y, float height, const MFVector &colour, const char *pFormat,...) MFPRINTF_FUNC(6
 Render a formatted string. More...
 
MF_API MFFont * MFFont_GetDebugFont ()
 Get the debug font. More...
 

Detailed Description

Fuji Fonts are generated from source data produced by the excellent BMFont tool written and maintained by Andreas J�nsson.
The tool can be downloaded here: http://www.angelcode.com/products/bmfont/
Basic unicode support is available by submitting unicode strings beginning with the unicode character 0xFEFF to the standard ascii versions of these functions.