27 short _characterCount;
41Font* Font_Create(
void);
114void Font_Printf(
Font* font,
Color4f* color,
float x,
float y,
float textHeight,
const char* format, ... );
236void _Font_Bind(
Font* font,
short charw,
short charh,
char firstCharacter);
237void _Font_BindPadded(
Font* font,
short charw,
short charh,
char firstCharacter,
short charactersPerRow);
238void _Font_BindSelective(
Font* font,
short charw,
short charh,
const char* characters,
short charactersPerRow);
239void _Font_CreateTextureCoordList(
Font* font,
short rows,
short charactersPerRow,
short texW,
short texH);
240void _Font_CreateTextureCoordListSelective(
Font* font,
short rows,
short charactersPerRow,
short texW,
short texH,
const char* characters);
242void _Font_CreateCoordinatesForGlyph(
Font* font, u32 textureIndex,
short cx,
short cy,
short texW,
short texH);
243vec2 _Font_GetTextureCoordinate(
Font* font,
char character);
244vec2 _Font_GetTextureCoordinateGlyph(
Font* font, IconSymbol glyph);
Color struct and functions.
void Font_SetSpacingOnce(Font *font, float x, float y)
Sets the spacing of the font for the next Print call.
Definition mgdl-font.cpp:311
void Font_PrintOrigo(Font *font, Color4f *color, float textHeight, AlignmentModes alignmentX, AlignmentModes alignmentY, const char *text)
Draws text either in 2D or 3D.
Definition mgdl-font.cpp:282
RectF Font_GetUVRect(Font *font, char letter)
Get the texture coordinate corners of a letter.
Definition mgdl-font.cpp:336
Font * Font_LoadSelective(Texture *fontTexture, short charw, short charh, short charactersPerRow, const char *characters)
Loads a font from an image.
Definition mgdl-font.cpp:54
void Font_Print(Font *font, Color4f *color, float x, float y, float textHeight, const char *text)
Draws text either in 2D or 3D.
Definition mgdl-font.cpp:277
void Font_PrintAligned(Font *font, Color4f *color, float x, float y, float textHeight, AlignmentModes alignmentX, AlignmentModes alignmentY, const char *text)
Draws text either in 2D or 3D.
Definition mgdl-font.cpp:195
Font * Font_Load(Texture *fontTexture, short charw, short charh, char firstCharacter)
Loads a font from an image.
Definition mgdl-font.cpp:32
void Font_IconRotated(Font *font, Color4f *color, float x, float y, float textHeight, AlignmentModes alignmentX, AlignmentModes alignmentY, u8 rotation, IconSymbol glyph)
Draws an icon rotated.
Definition mgdl-font.cpp:118
void Font_SetLineLimitOnce(short limit)
Sets the max amount of letters printed for the next Print* call.
Definition mgdl-font.cpp:317
void Font_PrintfAligned(Font *font, Color4f *color, float x, float y, float textHeight, AlignmentModes alignmentX, AlignmentModes alignmentY, const char *format,...)
Draws text either in 2D or 3D.
Definition mgdl-font.cpp:302
Font * Font_LoadPadded(Texture *fontTexture, short charw, short charh, char firstCharacter, short charactersPerRow)
Loads a font from an image.
Definition mgdl-font.cpp:43
RectF Font_GetUVRectIcon(Font *font, IconSymbol glyph)
Get the texture coordinate corners of an IconSymbol.
Definition mgdl-font.cpp:342
void Font_PrintfOrigo(Font *font, Color4f *color, float textHeight, AlignmentModes alignmentX, AlignmentModes alignmentY, const char *format,...)
Draws text either in 2D or 3D.
Definition mgdl-font.cpp:295
void Font_Printf(Font *font, Color4f *color, float x, float y, float textHeight, const char *format,...)
Draws text either in 2D or 3D.
Definition mgdl-font.cpp:288
void Font_Icon(Font *font, Color4f *color, float x, float y, float textHeight, AlignmentModes alignmentX, AlignmentModes alignmentY, IconSymbol glyph)
Draws an icon, only compatible with the debug font.
Definition mgdl-font.cpp:113
Texture handling module header.
Library types, macros, defines and enums header.
AlignmentModes
Alignment modes.
Definition mgdl-types.h:112
Definition mgdl-color.h:54
Represents a font that can be used to draw text.
Definition mgdl-font.h:16
char _firstIndex
Definition mgdl-font.h:26
short characterWidth
Definition mgdl-font.h:17
short characterHeight
Definition mgdl-font.h:18
Definition mgdl-types.h:211
Abstract class for cross platform PNG image loading.
Definition mgdl-texture.h:13