flFont.h File Reference

#include "flGlobal.h"
#include "flTexture.h"

Go to the source code of this file.

Classes

struct  Font

Defines

#define FONT_TYPE_NONE   0
#define FONT_TYPE_TEXTURE   1
#define FONT_TYPE_DEBUG   2
#define FONT_TYPE_TEXTURE_MONO   3
#define fontDraw2dStringFromRight(inX, inY, inFont, inString)   fontDraw2dString((inX - fontStringWidth(inFont, inString)), inY, inFont, inString);

Functions

void fontInit ()
FontfontLoad (char *inPath)
bool fontSave (char *inPath, Font *inFont)
FontfontCreateTexture (Texture *inTex, int inHSpace, int inVSpace, u32 inColor)
FontfontCreateDebug (int inHSpace, int inVSpace, u32 inColor)
bool fontCreateDebugTex ()
void fontDebugSetColor (u32 inColor, u32 inBackColor)
void fontFree (Font *inFont)
int fontHeight (Font *inFont)
int fontCharWidth (Font *inFont, char inChar)
int fontStringWidth (Font *inFont, char *inString)
int fontStringHeight (Font *inFont, char *inString)
bool fontDraw2dChar (int inX, int inY, Font *inFont, char inChar)
void fontDraw2dString (int inX, int inY, Font *inFont, char *inString)
void fontDraw2dStringCenter (int inY, Font *inFont, char *inString)

Variables

FontfontDefault


Define Documentation

#define FONT_TYPE_DEBUG   2

Definition at line 30 of file flFont.h.

Referenced by fontCharWidth(), fontCreateDebug(), fontDraw2dChar(), fontDraw2dString(), and fontHeight().

#define FONT_TYPE_NONE   0

Definition at line 28 of file flFont.h.

#define FONT_TYPE_TEXTURE   1

Definition at line 29 of file flFont.h.

Referenced by fontCharWidth(), fontCreateTexture(), fontDraw2dChar(), fontDraw2dString(), fontFree(), and fontHeight().

#define FONT_TYPE_TEXTURE_MONO   3

Definition at line 31 of file flFont.h.

Referenced by fontCharWidth(), fontDraw2dChar(), fontDraw2dString(), fontFree(), and fontHeight().

#define fontDraw2dStringFromRight ( inX,
inY,
inFont,
inString   )     fontDraw2dString((inX - fontStringWidth(inFont, inString)), inY, inFont, inString);

Definition at line 68 of file flFont.h.


Function Documentation

int fontCharWidth ( Font inFont,
char  inChar 
)

Definition at line 245 of file flFont.c.

References ASCII_BS, ASCII_TAB, debugWarning, FL_FONT_TABWIDTH_DEFAULT, FONT_TYPE_DEBUG, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontData, Font::fontFixedWidth, Font::fontType, and Texture::texWidth.

Referenced by fontDraw2dChar(), fontDraw2dString(), and fontStringWidth().

Font* fontCreateDebug ( int  inHSpace,
int  inVSpace,
u32  inColor 
)

Definition at line 117 of file flFont.c.

References debugWarning, FONT_TYPE_DEBUG, Font::fontBackColor, Font::fontColor, fontCreateDebugTex(), Font::fontData, Font::fontDataGlobal, fontDebugTex, Font::fontFixedWidth, Font::fontHSpace, Font::fontType, Font::fontVSpace, memAlloc, and NULL.

Referenced by fontInit().

bool fontCreateDebugTex (  ) 

Definition at line 143 of file flFont.c.

References debugError, fontDebugTex, fontMonoPal, graphicsSwizzleData(), memAlign, msx, and vmemAlloc.

Referenced by fontCreateDebug().

Font* fontCreateTexture ( Texture inTex,
int  inHSpace,
int  inVSpace,
u32  inColor 
)

Definition at line 90 of file flFont.c.

References debugWarning, FONT_TYPE_TEXTURE, Font::fontBackColor, Font::fontColor, Font::fontData, Font::fontDataGlobal, Font::fontFixedWidth, Font::fontHSpace, Font::fontType, Font::fontVSpace, memAlloc, and NULL.

Referenced by fontLoad().

void fontDebugSetColor ( u32  inColor,
u32  inBackColor 
)

bool fontDraw2dChar ( int  inX,
int  inY,
Font inFont,
char  inChar 
)

Definition at line 310 of file flFont.c.

References debugError, debugWarning, FONT_TYPE_DEBUG, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontBackColor, fontCharWidth(), Font::fontColor, Font::fontData, fontDebugTex, fontHeight(), fontMonoPal, Font::fontType, NULL, palBound, palCreateMonoT4(), Palette::palData, palFree(), texBind(), texBound, Texture::texPalette, vertCVs::vertColor, vertTsVs::vertU, vertTsVs::vertV, vertTsVs::vertX, vertCVs::vertX, vertTsVs::vertY, vertCVs::vertY, vertTsVs::vertZ, and vertCVs::vertZ.

void fontDraw2dString ( int  inX,
int  inY,
Font inFont,
char *  inString 
)

Definition at line 435 of file flFont.c.

References ASCII_BS, ASCII_CR, ASCII_LF, ASCII_SPACE, ASCII_TAB, debugError, debugWarning, FONT_TYPE_DEBUG, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontBackColor, fontCharWidth(), Font::fontColor, Font::fontData, fontDebugTex, fontHeight(), Font::fontHSpace, fontMonoPal, Font::fontType, Font::fontVSpace, NULL, palBound, palCreateMonoT4(), Palette::palData, palFree(), texBind(), texBound, Texture::texPalette, vertCVs::vertColor, vertTsVs::vertU, vertTsVs::vertV, vertCVs::vertX, vertTsVs::vertX, vertCVs::vertY, vertTsVs::vertY, vertCVs::vertZ, and vertTsVs::vertZ.

Referenced by fontDraw2dStringCenter(), graphicsSwapBuffers(), ntfyShowBattery(), ntfyShowTime(), and ntfyTrayShow().

void fontDraw2dStringCenter ( int  inY,
Font inFont,
char *  inString 
)

Definition at line 590 of file flFont.c.

References fontDraw2dString(), fontHeight(), fontStringWidth(), and SCREEN_WIDTH.

void fontFree ( Font inFont  ) 

Definition at line 206 of file flFont.c.

References debugWarning, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontData, Font::fontDataGlobal, Font::fontType, memFree, and texFree().

int fontHeight ( Font inFont  ) 

Definition at line 227 of file flFont.c.

References debugWarning, FONT_TYPE_DEBUG, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontData, Font::fontType, and Texture::texHeight.

Referenced by fontDraw2dChar(), fontDraw2dString(), fontDraw2dStringCenter(), fontStringHeight(), ntfyShowBattery(), ntfyShowTime(), and ntfyTrayShow().

void fontInit (  ) 

Definition at line 38 of file flFont.c.

References FL_FONT_COLOR_DEFAULT, fontCreateDebug(), and fontDefault.

Referenced by flInitialize().

Font* fontLoad ( char *  inPath  ) 

Definition at line 42 of file flFont.c.

References ASCII_A, ASCII_Z, debugDevWarning, debugWarning, FL_FONT_COLOR_DEFAULT, FL_FONT_HSPACE_DEFAULT, FL_FONT_VSPACE_DEFAULT, fontCreateTexture(), Font::fontDataGlobal, NULL, and texLoad().

bool fontSave ( char *  inPath,
Font inFont 
)

Definition at line 82 of file flFont.c.

References debugDevWarning.

int fontStringHeight ( Font inFont,
char *  inString 
)

Definition at line 297 of file flFont.c.

References fontHeight().

int fontStringWidth ( Font inFont,
char *  inString 
)

Definition at line 277 of file flFont.c.

References ASCII_LF, ASCII_SPACE, fontCharWidth(), and Font::fontHSpace.

Referenced by fontDraw2dStringCenter(), and ntfyShowBattery().


Variable Documentation

Font* fontDefault

Definition at line 36 of file flFont.c.

Referenced by fontInit(), graphicsSwapBuffers(), ntfyShowBattery(), ntfyShowTime(), and ntfyTrayShow().


Generated on Wed Sep 5 19:04:02 2007 for funcLib by  doxygen 1.5.1