linkedVersion()
byteSwappedUNICODE(Int)
init()
openFont(File, PointSize)
openFontIndex(File, PointSize, Index)
openFontRW()
openFontIndexRW()
getFontStyle(Font)
setFontStyle(Font, FontStyle)
fontHeight(Font)
fontAscent(Font)
fontDescent(Font)
fontLineSkip(Font)
fontFaces(Font)
fontFaceIsFixedWidth(Font)
fontFaceFamilyName(Font)
fontFaceStyleName(Font)
glyphMetrics(Font, Ch)
sizeText(Font, Text)
sizeUTF8(Font, Text)
sizeUNICODE(Font, Text)
renderTextSolid(Font, Text, FgColor)
renderUTF8Solid(Font, Text, FgColor)
renderUNICODESolid(Font, Text, FgColor)
renderGlyphSolid(Font, Glyph, FgColor)
renderTextShaded(Font, Text, FgColor, BgColor)
renderUTF8Shaded(Font, Text, FgColor, BgColor)
renderUNICODEShaded(Font, Text, FgColor, BgColor)
renderGlyphShaded(Font, Glyph, FgColor, BgColor)
renderTextBlended(Font, Text, FgColor)
renderUTF8Blended(Font, Text, FgColor)
renderUNICODEBlended(Font, Text, FgColor)
renderGlyphBlended(Font, Glyph, FgColor)
closeFont(Font)
quit()
wasInit()
setError(_Error)
getError() Args: -
Returns: {Major, Minor, Patch}
C-API: const SDL_version * TTF_Linked_Version(void);
Desc:
This function gets the version of the SDL_ttf library.
Args: Int
Returns: void
C-API: void TTF_ByteSwappedUNICODE(int swapped);
Desc:
This function tells the library whether UNICODE text is generally byteswapped. A UNICODE BOM character in a string will override this setting for the remainder of that string.
Args: -
Returns: Result
C-API: int TTF_Init(void);
Desc:
Initialize the TTF engine. Returns 0 on success, -1 on any error.
Args: File, PointSize
Returns: TTF_Font Ref
C-API: TTF_Font * TTF_OpenFont(const char *file, int ptsize);
Desc:
Open a font file and create a font of the specified point size.
Args: File, PointSize, Index
Returns: TTF_Font Ref
C-API: TTF_Font * TTF_OpenFontIndex(const char *file, int ptsize, long index);
Desc:
Open a font file and create a font of the specified point size. Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
Args: N/A
Returns: N/A
C-API: TTF_Font * TTF_OpenFontRW(SDL_RWops *src, int freesrc, int ptsize);
Desc:
Not implemented.
Args: N/A
Returns: N/A
C-API: TTF_Font * TTF_OpenFontIndexRW(SDL_RWops *src, int freesrc, int ptsize, long index);
Desc:
Not implemented.
Args: TTF_Font Ref
Returns: FontStyle
C-API: int TTF_GetFontStyle(TTF_Font *font);
Desc:
Retrieve the font style. This font style is implemented by modifying the font glyphs, and doesn't reflect any inherent properties of the truetype font file.
Args: TTF_Font Ref, FontStyle
C-API: void TTF_SetFontStyle(TTF_Font *font, int style);
Desc:
Set the font style. This font style is implemented by modifying the font glyphs, and doesn't reflect any inherent properties of the truetype font file.
Args: TTF_Font Ref
Returns: FontHeight
C-API: int TTF_FontHeight(TTF_Font *font);
Desc:
Get the total height of the font - usually equal to point size
Args: TTF_Font Ref
Returns: FontAscent
C-API: int TTF_FontAscent(TTF_Font *font);
Desc:
Get the offset from the baseline to the top of the font This is a positive value, relative to the baseline.
Args: TTF_Font Ref
Returns: FontDescent
C-API: int TTF_FontDescent(TTF_Font *font);
Desc:
Get the offset from the baseline to the bottom of the font This is a negative value, relative to the baseline.
Args: TTF_Font Ref
Returns: FontLineSkip
C-API: int TTF_FontLineSkip(TTF_Font *font);
Desc:
Get the recommended spacing between lines of text for this font
Args: TTF_Font Ref
Returns: FontFaces
C-API: long TTF_FontFaces(TTF_Font *font);
Desc:
Get the number of faces of the font
Args: TTF_Font Ref
Returns: IsFixedWidth
C-API: int TTF_FontFaceIsFixedWidth(TTF_Font *font);
Desc:
Test if the current font face of the loaded font is a fixed width font. Fixed width fonts are monospace, meaning every character that exists in the font is the same width, thus you can assume that a rendered string's width is going to be the result of a simple calculation: glyph_width * string_length
Args: TTF_Font Ref
Returns: FaceFamilyName
C-API: char * TTF_FontFaceFamilyName(TTF_Font *font);
Desc:
Get the current font face family name from the loaded font. This function may return a NULL pointer, in which case the information is not available.
Args: TTF_Font Ref
Returns: FaceStyleName
C-API: char * TTF_FontFaceStyleName(TTF_Font *font);
Desc:
Get the current font face style name from the loaded font. This function may return a NULL pointer, in which case the information is not available.
Args: TTF_Font Ref, Ch
Returns: {MinX, MinY, MaxX, MaxY, Advance}
C-API: int TTF_GlyphMetrics(TTF_Font *font, Uint16 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance);
Desc:
Get the metrics (dimensions) of a glyph.
Args: TTF_Font Ref, Text
Returns: {Width, Height}
C-API: int TTF_SizeText(TTF_Font *font, const char *text, int *w, int *h);
Desc:
Get the dimensions of a rendered string of text.
Args: TTF_Font Ref, Text
Returns: {Width, Height}
C-API: int TTF_SizeUTF8(TTF_Font *font, const char *text, int *w, int *h);
Desc:
Get the dimensions of a rendered string of text.
Args: TTF_Font Ref, Text
Returns: {Width, Height}
C-API: int TTF_SizeUNICODE(TTF_Font *font, const Uint16 *text, int *w, int *h);
Desc:
Get the dimensions of a rendered string of text.
Args: TTF_Font Ref, Text, FgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderText_Solid(TTF_Font *font, const char *text, SDL_Color fg);
Desc:
Create an 8-bit palettized surface and render the given text at the fast quality with the given font and color. The palette has 0 as the colorkey, giving it a transparent background, with 1 as the text color.
Args: TTF_Font Ref, Text, FgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderUTF8_Solid(TTF_Font *font, const char *text, SDL_Color fg);
Desc:
Create an 8-bit palettized surface and render the given text at the fast quality with the given font and color. The palette has 0 as the colorkey, giving it a transparent background, with 1 as the text color.
Args: TTF_Font Ref, Text, FgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderUNICODE_Solid(TTF_Font *font, const Uint16 *text, SDL_Color fg);
Desc:
Create an 8-bit palettized surface and render the given text at the fast quality with the given font and color. The palette has 0 as the colorkey, giving it a transparent background, with 1 as the text color.
Args: TTF_Font Ref, Glyph, FgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderGlyph_Solid(TTF_Font *font, Uint16 ch, SDL_Color fg);
Desc:
Create an 8-bit palettized surface and render the given glyph at fast quality with the given font and color. The 0 pixel is the colorkey, giving a transparent background, and the 1 pixel is set to the text color. The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
Args: TTF_Font Ref, Text, FgColor, BgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderText_Shaded(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg);
Desc:
Create an 8-bit palettized surface and render the given text at high quality with the given font and colors. The 0 pixel is background, while other pixels have varying degrees of the foreground color.
Args: TTF_Font Ref, Text, FgColor, BgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderUTF8_Shaded(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg);
Desc:
Create an 8-bit palettized surface and render the given text at high quality with the given font and colors. The 0 pixel is background, while other pixels have varying degrees of the foreground color.
Args: TTF_Font Ref, Text, FgColor, BgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderUNICODE_Shaded(TTF_Font *font, const Uint16 *text, SDL_Color fg, SDL_Color bg);
Desc:
Create an 8-bit palettized surface and render the given text at high quality with the given font and colors. The 0 pixel is background, while other pixels have varying degrees of the foreground color.
Args: TTF_Font Ref, Glyph, FgColor, BgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderGlyph_Shaded(TTF_Font *font, Uint16 ch, SDL_Color fg, SDL_Color bg);
Desc:
Create an 8-bit palettized surface and render the given glyph at high quality with the given font and colors. The 0 pixel is background, while other pixels have varying degrees of the foreground color. The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
Args: TTF_Font Ref, Text, FgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderText_Blended(TTF_Font *font, const char *text, SDL_Color fg);
Desc:
Create a 32-bit ARGB surface and render the given text at high quality, using alpha blending to dither the font with the given color.
Args: TTF_Font Ref, Text, FgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderUTF8_Blended(TTF_Font *font, const char *text, SDL_Color fg);
Desc:
Create a 32-bit ARGB surface and render the given text at high quality, using alpha blending to dither the font with the given color.
Args: TTF_Font Ref, Text, FgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderUNICODE_Blended(TTF_Font *font, const Uint16 *text, SDL_Color fg);
Desc:
Create a 32-bit ARGB surface and render the given text at high quality, using alpha blending to dither the font with the given color.
Args: TTF_Font Ref, Glyph, FgColor
Returns: SDL_Surface Ref
C-API: SDL_Surface * TTF_RenderGlyph_Blended(TTF_Font *font, Uint16 ch, SDL_Color fg);
Desc:
Create a 32-bit ARGB surface and render the given glyph at high quality, using alpha blending to dither the font with the given color. The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
Args: TTF_Font Ref
Returns: void
C-API: void TTF_CloseFont(TTF_Font *font);
Desc:
Close an opened font file.
Args: -
Returns: void
C-API: void TTF_Quit(void);
Desc:
De-initialize the TTF engine.
Args: -
Returns: Int
C-API: int TTF_WasInit(void);
Desc:
Check if the TTF engine is initialized.
Args: N/A
Returns: N/A
C-API: void TTF_SetError(const char *fmt, ...)
Desc:
Not implemented.
Args: -
Returns: Error
C-API: char * TTF_GetError()
Desc:
Returns a (string) containing a human readable version or the reason for the last error that occured.