citro2d
|
Functions | |
C2D_Font | C2D_FontLoad (const char *filename) |
Load a font from a file. More... | |
C2D_Font | C2D_FontLoadFromMem (const void *data, size_t size) |
Load a font from memory. More... | |
C2D_Font | C2D_FontLoadFromFD (int fd) |
Load a font from file descriptor. More... | |
C2D_Font | C2D_FontLoadFromHandle (FILE *f) |
Load font from stdio file handle. More... | |
C2D_Font | C2D_FontLoadSystem (CFG_Region region) |
Load corresponding font from system archive. More... | |
void | C2D_FontFree (C2D_Font font) |
Free a font. More... | |
void | C2D_FontSetFilter (C2D_Font font, GPU_TEXTURE_FILTER_PARAM magFilter, GPU_TEXTURE_FILTER_PARAM minFilter) |
Set a font's texture filter. More... | |
int | C2D_FontGlyphIndexFromCodePoint (C2D_Font font, u32 codepoint) |
Find the glyph index of a codepoint, or returns the default. More... | |
charWidthInfo_s * | C2D_FontGetCharWidthInfo (C2D_Font font, int glyphIndex) |
Get character width info for a given index. More... | |
void | C2D_FontCalcGlyphPos (C2D_Font font, fontGlyphPos_s *out, int glyphIndex, u32 flags, float scaleX, float scaleY) |
Calculate glyph position of given index. More... | |
FINF_s * | C2D_FontGetInfo (C2D_Font font) |
Get the font info structure associated with the font. More... | |
void C2D_FontCalcGlyphPos | ( | C2D_Font | font, |
fontGlyphPos_s * | out, | ||
int | glyphIndex, | ||
u32 | flags, | ||
float | scaleX, | ||
float | scaleY | ||
) |
Calculate glyph position of given index.
[in] | font | Font to read from, or NULL for system font |
[out] | out | Glyph position |
[in] | glyphIndex | Index to get position of |
[in] | flags | Misc flags |
[in] | scaleX | Size to scale in X |
[in] | scaleY | Size to scale in Y |
void C2D_FontFree | ( | C2D_Font | font | ) |
Free a font.
[in] | font | Font handle |
charWidthInfo_s* C2D_FontGetCharWidthInfo | ( | C2D_Font | font, |
int | glyphIndex | ||
) |
Get character width info for a given index.
[in] | font | Font to read from, or NULL for system font |
[in] | glyphIndex | Index to get the width of |
FINF_s* C2D_FontGetInfo | ( | C2D_Font | font | ) |
Get the font info structure associated with the font.
[in] | font | Font to read from, or NULL for the system font |
int C2D_FontGlyphIndexFromCodePoint | ( | C2D_Font | font, |
u32 | codepoint | ||
) |
Find the glyph index of a codepoint, or returns the default.
[in] | font | Font to search, or NULL for system font |
[in] | codepoint | Codepoint to search for |
font->cfnt->finf.alterCharIndex | The codepoint does not exist in the font |
C2D_Font C2D_FontLoad | ( | const char * | filename | ) |
Load a font from a file.
[in] | filename | Name of the font file (.bcfnt) |
NULL | Error |
C2D_Font C2D_FontLoadFromFD | ( | int | fd | ) |
Load a font from file descriptor.
[in] | fd | File descriptor used to load data |
NULL | Error |
C2D_Font C2D_FontLoadFromHandle | ( | FILE * | f | ) |
Load font from stdio file handle.
[in] | f | File handle used to load data |
NULL | Error |
C2D_Font C2D_FontLoadFromMem | ( | const void * | data, |
size_t | size | ||
) |
Load a font from memory.
[in] | data | Data to load |
[in] | size | Size of the data to load |
NULL | Error |
C2D_Font C2D_FontLoadSystem | ( | CFG_Region | region | ) |
Load corresponding font from system archive.
[in] | region | Region to get font from |
NULL | Error |
void C2D_FontSetFilter | ( | C2D_Font | font, |
GPU_TEXTURE_FILTER_PARAM | magFilter, | ||
GPU_TEXTURE_FILTER_PARAM | minFilter | ||
) |
Set a font's texture filter.
[in] | font | Font handle |
[in] | magFilter | the magnification filter |
[in] | minFilter | the minification filter |