Skip to content

Commit

Permalink
Sync SDL2_ttf header -> wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
SDLWikiBot committed May 9, 2024
1 parent c4b8873 commit 73f6e2d
Show file tree
Hide file tree
Showing 96 changed files with 847 additions and 252 deletions.
25 changes: 25 additions & 0 deletions SDL2_ttf/SDL_TTF_COMPILEDVERSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
###### (This function is part of SDL_ttf, a separate library from SDL.)
# SDL_TTF_COMPILEDVERSION

This is the version number macro for the current SDL_ttf version.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
#define SDL_TTF_COMPILEDVERSION \
SDL_VERSIONNUM(SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_PATCHLEVEL)
```
## Remarks
In versions higher than 2.9.0, the minor version overflows into the
thousands digit: for example, 2.23.0 is encoded as 4300. This macro will
not be available in SDL 3.x or SDL_ttf 3.x.
----
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro)
18 changes: 18 additions & 0 deletions SDL2_ttf/SDL_TTF_MAJOR_VERSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
###### (This function is part of SDL_ttf, a separate library from SDL.)
# SDL_TTF_MAJOR_VERSION

Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL

## Header File

Defined in SDL_ttf.h

## Syntax

```c
#define SDL_TTF_MAJOR_VERSION 2
```
----
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro)
23 changes: 23 additions & 0 deletions SDL2_ttf/SDL_TTF_VERSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
###### (This function is part of SDL_ttf, a separate library from SDL.)
# SDL_TTF_VERSION

This macro can be used to fill a version structure with the compile-time version of the SDL_ttf library.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
#define SDL_TTF_VERSION(X) \
{ \
(X)->major = SDL_TTF_MAJOR_VERSION; \
(X)->minor = SDL_TTF_MINOR_VERSION; \
(X)->patch = SDL_TTF_PATCHLEVEL; \
}
```

----
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro)

21 changes: 21 additions & 0 deletions SDL2_ttf/SDL_TTF_VERSION_ATLEAST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
###### (This function is part of SDL_ttf, a separate library from SDL.)
# SDL_TTF_VERSION_ATLEAST

This macro will evaluate to true if compiled with SDL_ttf at least X.Y.Z.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
#define SDL_TTF_VERSION_ATLEAST(X, Y, Z) \
((SDL_TTF_MAJOR_VERSION >= X) && \
(SDL_TTF_MAJOR_VERSION > X || SDL_TTF_MINOR_VERSION >= Y) && \
(SDL_TTF_MAJOR_VERSION > X || SDL_TTF_MINOR_VERSION > Y || SDL_TTF_PATCHLEVEL >= Z))
```
----
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_ByteSwappedUNICODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Tell SDL_ttf whether UNICODE text is generally byteswapped.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand All @@ -26,5 +30,5 @@ remainder of that string.
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
26 changes: 15 additions & 11 deletions SDL2_ttf/TTF_CloseFont.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Dispose of a previously-created font.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand Down Expand Up @@ -32,18 +36,18 @@ this call, as well.
This function is available since SDL_ttf 2.0.12.
## Related Functions
## See Also
* [TTF_OpenFont](TTF_OpenFont)
* [TTF_OpenFontIndexDPIRW](TTF_OpenFontIndexDPIRW)
* [TTF_OpenFontRW](TTF_OpenFontRW)
* [TTF_OpenFontDPI](TTF_OpenFontDPI)
* [TTF_OpenFontDPIRW](TTF_OpenFontDPIRW)
* [TTF_OpenFontIndex](TTF_OpenFontIndex)
* [TTF_OpenFontIndexDPI](TTF_OpenFontIndexDPI)
* [TTF_OpenFontIndexDPIRW](TTF_OpenFontIndexDPIRW)
* [TTF_OpenFontIndexRW](TTF_OpenFontIndexRW)
- [TTF_OpenFont](TTF_OpenFont)
- [TTF_OpenFontIndexDPIRW](TTF_OpenFontIndexDPIRW)
- [TTF_OpenFontRW](TTF_OpenFontRW)
- [TTF_OpenFontDPI](TTF_OpenFontDPI)
- [TTF_OpenFontDPIRW](TTF_OpenFontDPIRW)
- [TTF_OpenFontIndex](TTF_OpenFontIndex)
- [TTF_OpenFontIndexDPI](TTF_OpenFontIndexDPI)
- [TTF_OpenFontIndexDPIRW](TTF_OpenFontIndexDPIRW)
- [TTF_OpenFontIndexRW](TTF_OpenFontIndexRW)
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
28 changes: 28 additions & 0 deletions SDL2_ttf/TTF_Direction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
###### (This function is part of SDL_ttf, a separate library from SDL.)
# TTF_Direction

Direction flags

## Header File

Defined in SDL_ttf.h

## Syntax

```c
typedef enum TTF_Direction
{
TTF_DIRECTION_LTR = 0, /* Left to Right */
TTF_DIRECTION_RTL, /* Right to Left */
TTF_DIRECTION_TTB, /* Top to Bottom */
TTF_DIRECTION_BTT /* Bottom to Top */
} TTF_Direction;
```

## See Also

- [TTF_SetFontDirection](TTF_SetFontDirection)

----
[CategoryAPI](CategoryAPI), [CategoryAPIEnum](CategoryAPIEnum)

6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_FontAscent.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query the offset from the baseline to the top of a font.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand All @@ -29,5 +33,5 @@ This is a positive value, relative to the baseline.
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_FontDescent.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query the offset from the baseline to the bottom of a font.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand All @@ -29,5 +33,5 @@ This is a negative value, relative to the baseline.
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_FontFaceFamilyName.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query a font's family name.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand Down Expand Up @@ -33,5 +37,5 @@ of the font, when `font` is handed to [TTF_CloseFont](TTF_CloseFont)().
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_FontFaceIsFixedWidth.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query whether a font is fixed-width.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand Down Expand Up @@ -33,5 +37,5 @@ are more likely to not be fixed-width in most cases.
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_FontFaceStyleName.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query a font's style name.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand Down Expand Up @@ -33,5 +37,5 @@ of the font, when `font` is handed to [TTF_CloseFont](TTF_CloseFont)().
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_FontFaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query the number of faces of a font.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand All @@ -25,5 +29,5 @@ Returns the number of FreeType font faces.
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_FontHeight.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query the total height of a font.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand All @@ -29,5 +33,5 @@ This is usually equal to point size.
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_FontLineSkip.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query the recommended spacing between lines of text for a font.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand All @@ -25,5 +29,5 @@ Returns the font's recommended spacing.
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
22 changes: 22 additions & 0 deletions SDL2_ttf/TTF_GetError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
###### (This function is part of SDL_ttf, a separate library from SDL.)
# TTF_GetError

Get last SDL_ttf error

## Header File

Defined in SDL_ttf.h

## Syntax

```c
#define TTF_GetError SDL_GetError
```

## See Also

- [TTF_SetError](TTF_SetError)

----
[CategoryAPI](CategoryAPI), [CategoryAPIMacro](CategoryAPIMacro)

10 changes: 7 additions & 3 deletions SDL2_ttf/TTF_GetFontHinting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query a font's current FreeType hinter setting.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand Down Expand Up @@ -35,10 +39,10 @@ The hinter setting is a single value:
This function is available since SDL_ttf 2.0.12.
## Related Functions
## See Also
* [TTF_SetFontHinting](TTF_SetFontHinting)
- [TTF_SetFontHinting](TTF_SetFontHinting)
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
6 changes: 5 additions & 1 deletion SDL2_ttf/TTF_GetFontKerning.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

Query whether or not kerning is allowed for a font.

## Header File

Defined in SDL_ttf.h

## Syntax

```c
Expand All @@ -25,5 +29,5 @@ Returns non-zero if kerning is enabled, zero otherwise.
This function is available since SDL_ttf 2.0.12.
----
[CategoryAPI](CategoryAPI)
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)
Loading

0 comments on commit 73f6e2d

Please sign in to comment.