85 TRI_FONT_SIZE_PIXELS = 0,
91 TRI_FONT_ALIGN_LEFT = 0x0,
92 TRI_FONT_ALIGN_CENTER = 0x1,
93 TRI_FONT_ALIGN_RIGHT = 0x2,
94 TRI_FONT_ALIGN_JUSTIFY = 0x3,
95 TRI_FONT_HALIGN = 0xF,
96 TRI_FONT_ALIGN_TOP = 0x00,
97 TRI_FONT_ALIGN_MIDDLE = 0x10,
98 TRI_FONT_ALIGN_BOTTOM = 0x20,
99 TRI_FONT_VALIGN = 0xF0
125triFont* triFontLoad(
const triChar *filename, triUInt fontSize,
enum triFontSizeType fontSizeType, triUInt textureSize,
enum triFontLocation location);
194triSInt
triFontPrint(triFloat x, triFloat y, triUInt color,
const triChar *text);
206triSInt
triFontPrintf(triFloat x, triFloat y, triUInt color,
const triChar *text, ...);
222triSInt
triFontPrintAlign(triFloat x, triFloat y, triSInt width, triSInt height, triUInt color,
enum triFontAlignMode align,
const triChar *text);
237triSInt
triFontPrintAlignf(triFloat x, triFloat y, triSInt width, triSInt height, triUInt color,
enum triFontAlignMode align,
const triChar *text, ...);
triVoid triFontSetMono(triFont *font, triS32 width)
Set a font mono spaced or not (default).
triVoid triFontUnload(triFont *font)
Free the specified font.
triSInt triFontPrintf(triFloat x, triFloat y, triUInt color, const triChar *text,...)
Draw text along the baseline starting at x, y (with formatting).
triVoid triFontSetSpacing(triFont *font, triS32 letter, triS32 word)
Set a spacing values.
triSInt triFontMeasureLine(const triChar *text)
Measure a length of the current line of text if it were to be drawn.
triSInt triFontPrintAlign(triFloat x, triFloat y, triSInt width, triSInt height, triUInt color, enum triFontAlignMode align, const triChar *text)
Draw text along the baseline aligned within the box starting at x, y.
triSInt triFontMeasureTextHeight(const triChar *text)
Measure height of a text if it were to be drawn.
triVoid triFontActivate(triFont *font)
Activate the specified font.
triVoid triFontSaveTRF(triFont *font, triChar *filename)
Save the specified font to a triFont file.
triVoid triFontShutdown(void)
Shutdown the Font library.
triSInt triFontPrint(triFloat x, triFloat y, triUInt color, const triChar *text)
Draw text along the baseline starting at x, y.
triVoid triFontSetLineheight(triFont *font, triS32 height)
Set line height.
triSInt triFontMeasureText(const triChar *text)
Measure a length of text if it were to be drawn.
triSInt triFontPrintAlignf(triFloat x, triFloat y, triSInt width, triSInt height, triUInt color, enum triFontAlignMode align, const triChar *text,...)
Draw text along the baseline aligned within the box starting at x, y (with formatting).
triFont * triFontLoadTRF(const triChar *filename)
Load a TRF (triFont) font.
triBool triFontInit(void)
Initialise the Font library.
A Glyph struct.
Definition: triFont.h:53
A Font struct.
Definition: triFont.h:68
triFloat justify
Justify adjustment for the current line.
Definition: triFont.h:80
triSInt wordSpacing
Spacing adjustment for all whitespaces.
Definition: triFont.h:79
triSInt fixedWidth
Width for mono spaced output.
Definition: triFont.h:76
triUInt texSize
Texture size (power2)
Definition: triFont.h:69
triSInt letterSpacing
Spacing adjustment for all characters.
Definition: triFont.h:78
triUInt texHeight
Texture height (power2)
Definition: triFont.h:70
triSInt fixedHeight
Height for fixed line height.
Definition: triFont.h:77
enum triFontLocation location
Either in RAM or VRAM.
Definition: triFont.h:72
triUChar * texture
The bitmap data.
Definition: triFont.h:71