My Project
Loading...
Searching...
No Matches
SDL_ttf.h
Go to the documentation of this file.
1/*
2 SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
3 Copyright (C) 2001-2023 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22
36#ifndef SDL_TTF_H_
37#define SDL_TTF_H_
38
39#include "SDL.h"
40#include "begin_code.h"
41
42/* Set up for C function definitions, even when using C++ */
43#ifdef __cplusplus
44extern "C" {
45#endif
46
50#define SDL_TTF_MAJOR_VERSION 2
51#define SDL_TTF_MINOR_VERSION 20
52#define SDL_TTF_PATCHLEVEL 2
53
58#define SDL_TTF_VERSION(X) \
59{ \
60 (X)->major = SDL_TTF_MAJOR_VERSION; \
61 (X)->minor = SDL_TTF_MINOR_VERSION; \
62 (X)->patch = SDL_TTF_PATCHLEVEL; \
63}
64
68#define TTF_MAJOR_VERSION SDL_TTF_MAJOR_VERSION
69#define TTF_MINOR_VERSION SDL_TTF_MINOR_VERSION
70#define TTF_PATCHLEVEL SDL_TTF_PATCHLEVEL
71#define TTF_VERSION(X) SDL_TTF_VERSION(X)
72
73#if SDL_TTF_MAJOR_VERSION < 3 && SDL_MAJOR_VERSION < 3
83#define SDL_TTF_COMPILEDVERSION \
84 SDL_VERSIONNUM(SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_PATCHLEVEL)
85#endif /* SDL_TTF_MAJOR_VERSION < 3 && SDL_MAJOR_VERSION < 3 */
86
90#define SDL_TTF_VERSION_ATLEAST(X, Y, Z) \
91 ((SDL_TTF_MAJOR_VERSION >= X) && \
92 (SDL_TTF_MAJOR_VERSION > X || SDL_TTF_MINOR_VERSION >= Y) && \
93 (SDL_TTF_MAJOR_VERSION > X || SDL_TTF_MINOR_VERSION > Y || SDL_TTF_PATCHLEVEL >= Z))
94
95/* Make sure this is defined (only available in newer SDL versions) */
96#ifndef SDL_DEPRECATED
97#define SDL_DEPRECATED
98#endif
99
113extern DECLSPEC const SDL_version * SDLCALL TTF_Linked_Version(void);
114
128extern DECLSPEC void SDLCALL TTF_GetFreeTypeVersion(int *major, int *minor, int *patch);
129
141extern DECLSPEC void SDLCALL TTF_GetHarfBuzzVersion(int *major, int *minor, int *patch);
142
146#define UNICODE_BOM_NATIVE 0xFEFF
147#define UNICODE_BOM_SWAPPED 0xFFFE
148
159extern DECLSPEC void SDLCALL TTF_ByteSwappedUNICODE(SDL_bool swapped);
160
164typedef struct _TTF_Font TTF_Font;
165
186extern DECLSPEC int SDLCALL TTF_Init(void);
187
205extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFont(const char *file, int ptsize);
206
229extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFontIndex(const char *file, int ptsize, long index);
230
254extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFontRW(SDL_RWops *src, int freesrc, int ptsize);
255
284extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFontIndexRW(SDL_RWops *src, int freesrc, int ptsize, long index);
285
307extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFontDPI(const char *file, int ptsize, unsigned int hdpi, unsigned int vdpi);
308
335extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFontIndexDPI(const char *file, int ptsize, long index, unsigned int hdpi, unsigned int vdpi);
336
364extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFontDPIRW(SDL_RWops *src, int freesrc, int ptsize, unsigned int hdpi, unsigned int vdpi);
365
398extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFontIndexDPIRW(SDL_RWops *src, int freesrc, int ptsize, long index, unsigned int hdpi, unsigned int vdpi);
399
411extern DECLSPEC int SDLCALL TTF_SetFontSize(TTF_Font *font, int ptsize);
412
426extern DECLSPEC int SDLCALL TTF_SetFontSizeDPI(TTF_Font *font, int ptsize, unsigned int hdpi, unsigned int vdpi);
427
431#define TTF_STYLE_NORMAL 0x00
432#define TTF_STYLE_BOLD 0x01
433#define TTF_STYLE_ITALIC 0x02
434#define TTF_STYLE_UNDERLINE 0x04
435#define TTF_STYLE_STRIKETHROUGH 0x08
436
455extern DECLSPEC int SDLCALL TTF_GetFontStyle(const TTF_Font *font);
456
477extern DECLSPEC void SDLCALL TTF_SetFontStyle(TTF_Font *font, int style);
478
489extern DECLSPEC int SDLCALL TTF_GetFontOutline(const TTF_Font *font);
490
501extern DECLSPEC void SDLCALL TTF_SetFontOutline(TTF_Font *font, int outline);
502
503
507#define TTF_HINTING_NORMAL 0
508#define TTF_HINTING_LIGHT 1
509#define TTF_HINTING_MONO 2
510#define TTF_HINTING_NONE 3
511#define TTF_HINTING_LIGHT_SUBPIXEL 4
512
531extern DECLSPEC int SDLCALL TTF_GetFontHinting(const TTF_Font *font);
532
553extern DECLSPEC void SDLCALL TTF_SetFontHinting(TTF_Font *font, int hinting);
554
558#define TTF_WRAPPED_ALIGN_LEFT 0
559#define TTF_WRAPPED_ALIGN_CENTER 1
560#define TTF_WRAPPED_ALIGN_RIGHT 2
561
578extern DECLSPEC int SDLCALL TTF_GetFontWrappedAlign(const TTF_Font *font);
579
596extern DECLSPEC void SDLCALL TTF_SetFontWrappedAlign(TTF_Font *font, int align);
597
608extern DECLSPEC int SDLCALL TTF_FontHeight(const TTF_Font *font);
609
620extern DECLSPEC int SDLCALL TTF_FontAscent(const TTF_Font *font);
621
632extern DECLSPEC int SDLCALL TTF_FontDescent(const TTF_Font *font);
633
642extern DECLSPEC int SDLCALL TTF_FontLineSkip(const TTF_Font *font);
643
652extern DECLSPEC int SDLCALL TTF_GetFontKerning(const TTF_Font *font);
653
667extern DECLSPEC void SDLCALL TTF_SetFontKerning(TTF_Font *font, int allowed);
668
677extern DECLSPEC long SDLCALL TTF_FontFaces(const TTF_Font *font);
678
693extern DECLSPEC int SDLCALL TTF_FontFaceIsFixedWidth(const TTF_Font *font);
694
709extern DECLSPEC const char * SDLCALL TTF_FontFaceFamilyName(const TTF_Font *font);
710
725extern DECLSPEC const char * SDLCALL TTF_FontFaceStyleName(const TTF_Font *font);
726
747extern DECLSPEC int SDLCALL TTF_GlyphIsProvided(TTF_Font *font, Uint16 ch);
748
763extern DECLSPEC int SDLCALL TTF_GlyphIsProvided32(TTF_Font *font, Uint32 ch);
764
788extern DECLSPEC int SDLCALL TTF_GlyphMetrics(TTF_Font *font, Uint16 ch,
789 int *minx, int *maxx,
790 int *miny, int *maxy, int *advance);
791
809extern DECLSPEC int SDLCALL TTF_GlyphMetrics32(TTF_Font *font, Uint32 ch,
810 int *minx, int *maxx,
811 int *miny, int *maxy, int *advance);
812
837extern DECLSPEC int SDLCALL TTF_SizeText(TTF_Font *font, const char *text, int *w, int *h);
838
857extern DECLSPEC int SDLCALL TTF_SizeUTF8(TTF_Font *font, const char *text, int *w, int *h);
858
882extern DECLSPEC int SDLCALL TTF_SizeUNICODE(TTF_Font *font, const Uint16 *text, int *w, int *h);
883
911extern DECLSPEC int SDLCALL TTF_MeasureText(TTF_Font *font, const char *text, int measure_width, int *extent, int *count);
912
935extern DECLSPEC int SDLCALL TTF_MeasureUTF8(TTF_Font *font, const char *text, int measure_width, int *extent, int *count);
936
964extern DECLSPEC int SDLCALL TTF_MeasureUNICODE(TTF_Font *font, const Uint16 *text, int measure_width, int *extent, int *count);
965
998extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_Solid(TTF_Font *font,
999 const char *text, SDL_Color fg);
1000
1029extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUTF8_Solid(TTF_Font *font,
1030 const char *text, SDL_Color fg);
1031
1063extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUNICODE_Solid(TTF_Font *font,
1064 const Uint16 *text, SDL_Color fg);
1065
1096extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_Solid_Wrapped(TTF_Font *font,
1097 const char *text, SDL_Color fg, Uint32 wrapLength);
1098
1125extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUTF8_Solid_Wrapped(TTF_Font *font,
1126 const char *text, SDL_Color fg, Uint32 wrapLength);
1127
1159 const Uint16 *text, SDL_Color fg, Uint32 wrapLength);
1160
1192extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph_Solid(TTF_Font *font,
1193 Uint16 ch, SDL_Color fg);
1194
1224extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph32_Solid(TTF_Font *font,
1225 Uint32 ch, SDL_Color fg);
1226
1260extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_Shaded(TTF_Font *font,
1261 const char *text, SDL_Color fg, SDL_Color bg);
1262
1290extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUTF8_Shaded(TTF_Font *font,
1291 const char *text, SDL_Color fg, SDL_Color bg);
1292
1325extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUNICODE_Shaded(TTF_Font *font,
1326 const Uint16 *text, SDL_Color fg, SDL_Color bg);
1327
1360 const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength);
1361
1390 const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength);
1391
1424 const Uint16 *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength);
1425
1458extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph_Shaded(TTF_Font *font,
1459 Uint16 ch, SDL_Color fg, SDL_Color bg);
1460
1491extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph32_Shaded(TTF_Font *font,
1492 Uint32 ch, SDL_Color fg, SDL_Color bg);
1493
1526extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_Blended(TTF_Font *font,
1527 const char *text, SDL_Color fg);
1528
1555extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUTF8_Blended(TTF_Font *font,
1556 const char *text, SDL_Color fg);
1557
1589extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUNICODE_Blended(TTF_Font *font,
1590 const Uint16 *text, SDL_Color fg);
1591
1623 const char *text, SDL_Color fg, Uint32 wrapLength);
1624
1652 const char *text, SDL_Color fg, Uint32 wrapLength);
1653
1685 const Uint16 *text, SDL_Color fg, Uint32 wrapLength);
1686
1718extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph_Blended(TTF_Font *font,
1719 Uint16 ch, SDL_Color fg);
1720
1750extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph32_Blended(TTF_Font *font,
1751 Uint32 ch, SDL_Color fg);
1752
1786extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_LCD(TTF_Font *font,
1787 const char *text, SDL_Color fg, SDL_Color bg);
1788
1816extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUTF8_LCD(TTF_Font *font,
1817 const char *text, SDL_Color fg, SDL_Color bg);
1818
1851extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUNICODE_LCD(TTF_Font *font,
1852 const Uint16 *text, SDL_Color fg, SDL_Color bg);
1853
1886extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_LCD_Wrapped(TTF_Font *font,
1887 const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength);
1888
1917extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderUTF8_LCD_Wrapped(TTF_Font *font,
1918 const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength);
1919
1953 const Uint16 *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength);
1954
1987extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph_LCD(TTF_Font *font,
1988 Uint16 ch, SDL_Color fg, SDL_Color bg);
1989
2019extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph32_LCD(TTF_Font *font,
2020 Uint32 ch, SDL_Color fg, SDL_Color bg);
2021
2022
2023/* For compatibility with previous versions, here are the old functions */
2024#define TTF_RenderText(font, text, fg, bg) \
2025 TTF_RenderText_Shaded(font, text, fg, bg)
2026#define TTF_RenderUTF8(font, text, fg, bg) \
2027 TTF_RenderUTF8_Shaded(font, text, fg, bg)
2028#define TTF_RenderUNICODE(font, text, fg, bg) \
2029 TTF_RenderUNICODE_Shaded(font, text, fg, bg)
2030
2055extern DECLSPEC void SDLCALL TTF_CloseFont(TTF_Font *font);
2056
2075extern DECLSPEC void SDLCALL TTF_Quit(void);
2076
2097extern DECLSPEC int SDLCALL TTF_WasInit(void);
2098
2118extern SDL_DEPRECATED DECLSPEC int TTF_GetFontKerningSize(TTF_Font *font, int prev_index, int index);
2119
2141extern DECLSPEC int TTF_GetFontKerningSizeGlyphs(TTF_Font *font, Uint16 previous_ch, Uint16 ch);
2142
2158extern DECLSPEC int TTF_GetFontKerningSizeGlyphs32(TTF_Font *font, Uint32 previous_ch, Uint32 ch);
2159
2177extern DECLSPEC int TTF_SetFontSDF(TTF_Font *font, SDL_bool on_off);
2178
2190extern DECLSPEC SDL_bool TTF_GetFontSDF(const TTF_Font *font);
2191
2197#define TTF_SetError SDL_SetError
2198
2204#define TTF_GetError SDL_GetError
2205
2211typedef enum
2212{
2213 TTF_DIRECTION_LTR = 0, /* Left to Right */
2214 TTF_DIRECTION_RTL, /* Right to Left */
2215 TTF_DIRECTION_TTB, /* Top to Bottom */
2216 TTF_DIRECTION_BTT /* Bottom to Top */
2218
2241extern SDL_DEPRECATED DECLSPEC int SDLCALL TTF_SetDirection(int direction); /* hb_direction_t */
2242
2264extern SDL_DEPRECATED DECLSPEC int SDLCALL TTF_SetScript(int script); /* hb_script_t */
2265
2287extern DECLSPEC int SDLCALL TTF_SetFontDirection(TTF_Font *font, TTF_Direction direction);
2288
2306extern DECLSPEC int SDLCALL TTF_SetFontScriptName(TTF_Font *font, const char *script);
2307
2308/* Ends C function definitions when using C++ */
2309#ifdef __cplusplus
2310}
2311#endif
2312#include "close_code.h"
2313
2314#endif /* SDL_TTF_H_ */
2315
2316/* vi: set ts=4 sw=4 expandtab: */
DECLSPEC void SDLCALL TTF_CloseFont(TTF_Font *font)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Blended(TTF_Font *font, const Uint16 *text, SDL_Color fg)
DECLSPEC int SDLCALL TTF_SetFontSize(TTF_Font *font, int ptsize)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Solid(TTF_Font *font, const Uint16 *text, SDL_Color fg)
DECLSPEC int SDLCALL TTF_FontDescent(const TTF_Font *font)
DECLSPEC int SDLCALL TTF_GetFontOutline(const TTF_Font *font)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Shaded(TTF_Font *font, const Uint16 *text, SDL_Color fg, SDL_Color bg)
DECLSPEC const SDL_version *SDLCALL TTF_Linked_Version(void)
DECLSPEC int TTF_GetFontKerningSizeGlyphs(TTF_Font *font, Uint16 previous_ch, Uint16 ch)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph32_Solid(TTF_Font *font, Uint32 ch, SDL_Color fg)
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontIndexDPIRW(SDL_RWops *src, int freesrc, int ptsize, long index, unsigned int hdpi, unsigned int vdpi)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_LCD_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)
DECLSPEC int SDLCALL TTF_GetFontStyle(const TTF_Font *font)
TTF_Direction
Definition: SDL_ttf.h:2212
DECLSPEC const char *SDLCALL TTF_FontFaceStyleName(const TTF_Font *font)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Blended(TTF_Font *font, Uint16 ch, SDL_Color fg)
DECLSPEC void SDLCALL TTF_SetFontHinting(TTF_Font *font, int hinting)
DECLSPEC const char *SDLCALL TTF_FontFaceFamilyName(const TTF_Font *font)
DECLSPEC int SDLCALL TTF_WasInit(void)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Blended_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph32_Shaded(TTF_Font *font, Uint32 ch, SDL_Color fg, SDL_Color bg)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Blended_Wrapped(TTF_Font *font, const Uint16 *text, SDL_Color fg, Uint32 wrapLength)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Solid(TTF_Font *font, Uint16 ch, SDL_Color fg)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph32_LCD(TTF_Font *font, Uint32 ch, SDL_Color fg, SDL_Color bg)
DECLSPEC int SDLCALL TTF_GlyphIsProvided(TTF_Font *font, Uint16 ch)
DECLSPEC int SDLCALL TTF_MeasureUNICODE(TTF_Font *font, const Uint16 *text, int measure_width, int *extent, int *count)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_LCD(TTF_Font *font, Uint16 ch, SDL_Color fg, SDL_Color bg)
DECLSPEC int SDLCALL TTF_GlyphMetrics32(TTF_Font *font, Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance)
DECLSPEC TTF_Font *SDLCALL TTF_OpenFont(const char *file, int ptsize)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_LCD(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Solid(TTF_Font *font, const char *text, SDL_Color fg)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Shaded_Wrapped(TTF_Font *font, const Uint16 *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)
DECLSPEC int SDLCALL TTF_FontLineSkip(const TTF_Font *font)
DECLSPEC int SDLCALL TTF_SetFontDirection(TTF_Font *font, TTF_Direction direction)
DECLSPEC SDL_bool TTF_GetFontSDF(const TTF_Font *font)
DECLSPEC int SDLCALL TTF_SizeUTF8(TTF_Font *font, const char *text, int *w, int *h)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Blended(TTF_Font *font, const char *text, SDL_Color fg)
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontIndexDPI(const char *file, int ptsize, long index, unsigned int hdpi, unsigned int vdpi)
SDL_DEPRECATED DECLSPEC int SDLCALL TTF_SetDirection(int direction)
DECLSPEC int SDLCALL TTF_FontHeight(const TTF_Font *font)
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontIndex(const char *file, int ptsize, long index)
DECLSPEC void SDLCALL TTF_SetFontKerning(TTF_Font *font, int allowed)
DECLSPEC int TTF_GetFontKerningSizeGlyphs32(TTF_Font *font, Uint32 previous_ch, Uint32 ch)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_LCD_Wrapped(TTF_Font *font, const Uint16 *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)
SDL_DEPRECATED DECLSPEC int SDLCALL TTF_SetScript(int script)
DECLSPEC int SDLCALL TTF_Init(void)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Solid_Wrapped(TTF_Font *font, const Uint16 *text, SDL_Color fg, Uint32 wrapLength)
DECLSPEC void SDLCALL TTF_SetFontOutline(TTF_Font *font, int outline)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_LCD(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Solid_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Shaded(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)
DECLSPEC long SDLCALL TTF_FontFaces(const TTF_Font *font)
DECLSPEC int SDLCALL TTF_GlyphIsProvided32(TTF_Font *font, Uint32 ch)
DECLSPEC int SDLCALL TTF_SetFontSizeDPI(TTF_Font *font, int ptsize, unsigned int hdpi, unsigned int vdpi)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Shaded(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Shaded(TTF_Font *font, Uint16 ch, SDL_Color fg, SDL_Color bg)
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontDPIRW(SDL_RWops *src, int freesrc, int ptsize, unsigned int hdpi, unsigned int vdpi)
DECLSPEC void SDLCALL TTF_Quit(void)
DECLSPEC void SDLCALL TTF_SetFontStyle(TTF_Font *font, int style)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Solid(TTF_Font *font, const char *text, SDL_Color fg)
DECLSPEC int TTF_SetFontSDF(TTF_Font *font, SDL_bool on_off)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Blended(TTF_Font *font, const char *text, SDL_Color fg)
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontRW(SDL_RWops *src, int freesrc, int ptsize)
DECLSPEC void SDLCALL TTF_GetHarfBuzzVersion(int *major, int *minor, int *patch)
struct _TTF_Font TTF_Font
Definition: SDL_ttf.h:164
DECLSPEC int SDLCALL TTF_SetFontScriptName(TTF_Font *font, const char *script)
DECLSPEC int SDLCALL TTF_GetFontWrappedAlign(const TTF_Font *font)
DECLSPEC int SDLCALL TTF_FontAscent(const TTF_Font *font)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_LCD(TTF_Font *font, const Uint16 *text, SDL_Color fg, SDL_Color bg)
DECLSPEC void SDLCALL TTF_SetFontWrappedAlign(TTF_Font *font, int align)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Solid_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)
DECLSPEC int SDLCALL TTF_GlyphMetrics(TTF_Font *font, Uint16 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance)
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontIndexRW(SDL_RWops *src, int freesrc, int ptsize, long index)
DECLSPEC int SDLCALL TTF_MeasureText(TTF_Font *font, const char *text, int measure_width, int *extent, int *count)
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontDPI(const char *file, int ptsize, unsigned int hdpi, unsigned int vdpi)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Shaded_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)
DECLSPEC int SDLCALL TTF_GetFontHinting(const TTF_Font *font)
DECLSPEC void SDLCALL TTF_ByteSwappedUNICODE(SDL_bool swapped)
DECLSPEC int SDLCALL TTF_SizeUNICODE(TTF_Font *font, const Uint16 *text, int *w, int *h)
DECLSPEC int SDLCALL TTF_FontFaceIsFixedWidth(const TTF_Font *font)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Shaded_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph32_Blended(TTF_Font *font, Uint32 ch, SDL_Color fg)
DECLSPEC int SDLCALL TTF_SizeText(TTF_Font *font, const char *text, int *w, int *h)
DECLSPEC void SDLCALL TTF_GetFreeTypeVersion(int *major, int *minor, int *patch)
DECLSPEC int SDLCALL TTF_MeasureUTF8(TTF_Font *font, const char *text, int measure_width, int *extent, int *count)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Blended_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)
SDL_DEPRECATED DECLSPEC int TTF_GetFontKerningSize(TTF_Font *font, int prev_index, int index)
DECLSPEC int SDLCALL TTF_GetFontKerning(const TTF_Font *font)
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_LCD_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg, Uint32 wrapLength)
Definition: SDL_pixels.h:310
Definition: SDL_rwops.h:53
A collection of pixels used in software blitting.
Definition: SDL_surface.h:73
Definition: SDL_version.h:52