Skip to content

Commit

Permalink
Sync SDL3_ttf header -> wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
SDLWikiBot committed Sep 18, 2024
1 parent 9f1ea58 commit fd6dbb9
Show file tree
Hide file tree
Showing 23 changed files with 96 additions and 100 deletions.
8 changes: 4 additions & 4 deletions SDL3_ttf/TTF_ByteSwappedUNICODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
void TTF_ByteSwappedUNICODE(SDL_bool swapped);
void TTF_ByteSwappedUNICODE(bool swapped);
```
## Function Parameters
| | | |
| -------- | ----------- | ------------------------------------------------ |
| SDL_bool | **swapped** | boolean to indicate whether text is byteswapped. |
| | | |
| ---- | ----------- | ------------------------------------------------ |
| bool | **swapped** | boolean to indicate whether text is byteswapped. |
## Remarks
Expand Down
4 changes: 2 additions & 2 deletions SDL3_ttf/TTF_FontFaceIsFixedWidth.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_FontFaceIsFixedWidth(const TTF_Font *font);
bool TTF_FontFaceIsFixedWidth(const TTF_Font *font);
```
## Function Parameters
Expand All @@ -21,7 +21,7 @@ SDL_bool TTF_FontFaceIsFixedWidth(const TTF_Font *font);
## Return Value
(SDL_bool) Returns SDL_TRUE if fixed-width, SDL_FALSE if not.
(bool) Returns true if fixed-width, false if not.
## Remarks
Expand Down
4 changes: 2 additions & 2 deletions SDL3_ttf/TTF_GetFontKerning.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_GetFontKerning(const TTF_Font *font);
bool TTF_GetFontKerning(const TTF_Font *font);
```
## Function Parameters
Expand All @@ -21,7 +21,7 @@ SDL_bool TTF_GetFontKerning(const TTF_Font *font);
## Return Value
(SDL_bool) Returns SDL_TRUE if kerning is enabled, SDL_FALSE otherwise.
(bool) Returns true if kerning is enabled, false otherwise.
## Version
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_GlyphIsProvided.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_GlyphIsProvided(TTF_Font *font, Uint16 ch);
bool TTF_GlyphIsProvided(TTF_Font *font, Uint16 ch);
```
## Function Parameters
Expand All @@ -22,8 +22,8 @@ SDL_bool TTF_GlyphIsProvided(TTF_Font *font, Uint16 ch);
## Return Value
(SDL_bool) Returns SDL_TRUE if font provides a glyph for this character,
SDL_FALSE if not.
(bool) Returns true if font provides a glyph for this character, false if
not.
## Remarks
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_GlyphIsProvided32.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_GlyphIsProvided32(TTF_Font *font, Uint32 ch);
bool TTF_GlyphIsProvided32(TTF_Font *font, Uint32 ch);
```
## Function Parameters
Expand All @@ -22,8 +22,8 @@ SDL_bool TTF_GlyphIsProvided32(TTF_Font *font, Uint32 ch);
## Return Value
(SDL_bool) Returns SDL_TRUE if font provides a glyph for this character,
SDL_FALSE if not.
(bool) Returns true if font provides a glyph for this character, false if
not.
## Remarks
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_GlyphMetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_GlyphMetrics(TTF_Font *font, Uint16 ch,
bool TTF_GlyphMetrics(TTF_Font *font, Uint16 ch,
int *minx, int *maxx,
int *miny, int *maxy, int *advance);
```
Expand All @@ -24,8 +24,8 @@ SDL_bool TTF_GlyphMetrics(TTF_Font *font, Uint16 ch,
## Return Value
(SDL_bool) Returns SDL_TRUE on success or SDL_FALSE on failure; call
SDL_GetError() for more information.
(bool) Returns true on success or false on failure; call SDL_GetError() for
more information.
## Remarks
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_GlyphMetrics32.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_GlyphMetrics32(TTF_Font *font, Uint32 ch,
bool TTF_GlyphMetrics32(TTF_Font *font, Uint32 ch,
int *minx, int *maxx,
int *miny, int *maxy, int *advance);
```
Expand All @@ -24,8 +24,8 @@ SDL_bool TTF_GlyphMetrics32(TTF_Font *font, Uint32 ch,
## Return Value
(SDL_bool) Returns SDL_TRUE on success or SDL_FALSE on failure; call
SDL_GetError() for more information.
(bool) Returns true on success or false on failure; call SDL_GetError() for
more information.
## Remarks
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_Init.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_Init(void);
bool TTF_Init(void);
```
## Return Value
(SDL_bool) Returns SDL_TRUE on success or SDL_FALSE on failure; call
SDL_GetError() for more information.
(bool) Returns true on success or false on failure; call SDL_GetError() for
more information.
## Remarks
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_MeasureText.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_MeasureText(TTF_Font *font, const char *text, int measure_width, int *extent, int *count);
bool TTF_MeasureText(TTF_Font *font, const char *text, int measure_width, int *extent, int *count);
```
## Function Parameters
Expand All @@ -25,8 +25,8 @@ SDL_bool TTF_MeasureText(TTF_Font *font, const char *text, int measure_width, in
## Return Value
(SDL_bool) Returns SDL_TRUE on success or SDL_FALSE on failure; call
SDL_GetError() for more information.
(bool) Returns true on success or false on failure; call SDL_GetError() for
more information.
## Remarks
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_MeasureUNICODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_MeasureUNICODE(TTF_Font *font, const Uint16 *text, int measure_width, int *extent, int *count);
bool TTF_MeasureUNICODE(TTF_Font *font, const Uint16 *text, int measure_width, int *extent, int *count);
```
## Function Parameters
Expand All @@ -25,8 +25,8 @@ SDL_bool TTF_MeasureUNICODE(TTF_Font *font, const Uint16 *text, int measure_widt
## Return Value
(SDL_bool) Returns SDL_TRUE on success or SDL_FALSE on failure; call
SDL_GetError() for more information.
(bool) Returns true on success or false on failure; call SDL_GetError() for
more information.
## Remarks
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_MeasureUTF8.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_MeasureUTF8(TTF_Font *font, const char *text, int measure_width, int *extent, int *count);
bool TTF_MeasureUTF8(TTF_Font *font, const char *text, int measure_width, int *extent, int *count);
```
## Function Parameters
Expand All @@ -25,8 +25,8 @@ SDL_bool TTF_MeasureUTF8(TTF_Font *font, const char *text, int measure_width, in
## Return Value
(SDL_bool) Returns SDL_TRUE on success or SDL_FALSE on failure; call
SDL_GetError() for more information.
(bool) Returns true on success or false on failure; call SDL_GetError() for
more information.
## Remarks
Expand Down
21 changes: 10 additions & 11 deletions SDL3_ttf/TTF_OpenFontDPIIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
TTF_Font * TTF_OpenFontDPIIO(SDL_IOStream *src, SDL_bool closeio, int ptsize, unsigned int hdpi, unsigned int vdpi);
TTF_Font * TTF_OpenFontDPIIO(SDL_IOStream *src, bool closeio, int ptsize, unsigned int hdpi, unsigned int vdpi);
```
## Function Parameters
| | | |
| -------------- | ----------- | ---------------------------------------------------------------------------- |
| SDL_IOStream * | **src** | an SDL_IOStream to provide a font file's data. |
| SDL_bool | **closeio** | SDL_TRUE to close `src` when the font is closed, SDL_FALSE to leave it open. |
| int | **ptsize** | point size to use for the newly-opened font. |
| unsigned int | **hdpi** | the target horizontal DPI. |
| unsigned int | **vdpi** | the target vertical DPI. |
| | | |
| -------------- | ----------- | -------------------------------------------------------------------- |
| SDL_IOStream * | **src** | an SDL_IOStream to provide a font file's data. |
| bool | **closeio** | true to close `src` when the font is closed, false to leave it open. |
| int | **ptsize** | point size to use for the newly-opened font. |
| unsigned int | **hdpi** | the target horizontal DPI. |
| unsigned int | **vdpi** | the target vertical DPI. |
## Return Value
Expand All @@ -36,9 +36,8 @@ 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.
If `closeio` is SDL_TRUE `src` will be automatically closed once the font
is closed. Otherwise you should close `src` yourself after closing the
font.
If `closeio` is true `src` will be automatically closed once the font is
closed. Otherwise you should close `src` yourself after closing the font.
When done with the returned [TTF_Font](TTF_Font), use
[TTF_CloseFont](TTF_CloseFont)() to dispose of it.
Expand Down
17 changes: 8 additions & 9 deletions SDL3_ttf/TTF_OpenFontIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
TTF_Font * TTF_OpenFontIO(SDL_IOStream *src, SDL_bool closeio, int ptsize);
TTF_Font * TTF_OpenFontIO(SDL_IOStream *src, bool closeio, int ptsize);
```
## Function Parameters
| | | |
| -------------- | ----------- | ---------------------------------------------------------------------------- |
| SDL_IOStream * | **src** | an SDL_IOStream to provide a font file's data. |
| SDL_bool | **closeio** | SDL_TRUE to close `src` when the font is closed, SDL_FALSE to leave it open. |
| int | **ptsize** | point size to use for the newly-opened font. |
| | | |
| -------------- | ----------- | -------------------------------------------------------------------- |
| SDL_IOStream * | **src** | an SDL_IOStream to provide a font file's data. |
| bool | **closeio** | true to close `src` when the font is closed, false to leave it open. |
| int | **ptsize** | point size to use for the newly-opened font. |
## Return Value
Expand All @@ -32,9 +32,8 @@ 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.
If `closeio` is SDL_TRUE, `src` will be automatically closed once the font
is closed. Otherwise you should close `src` yourself after closing the
font.
If `closeio` is true, `src` will be automatically closed once the font is
closed. Otherwise you should close `src` yourself after closing the font.
When done with the returned [TTF_Font](TTF_Font), use
[TTF_CloseFont](TTF_CloseFont)() to dispose of it.
Expand Down
23 changes: 11 additions & 12 deletions SDL3_ttf/TTF_OpenFontIndexDPIIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
TTF_Font * TTF_OpenFontIndexDPIIO(SDL_IOStream *src, SDL_bool closeio, int ptsize, long index, unsigned int hdpi, unsigned int vdpi);
TTF_Font * TTF_OpenFontIndexDPIIO(SDL_IOStream *src, bool closeio, int ptsize, long index, unsigned int hdpi, unsigned int vdpi);
```
## Function Parameters
| | | |
| -------------- | ----------- | ---------------------------------------------------------------------------- |
| SDL_IOStream * | **src** | an SDL_IOStream to provide a font file's data. |
| SDL_bool | **closeio** | SDL_TRUE to close `src` when the font is closed, SDL_FALSE to leave it open. |
| int | **ptsize** | point size to use for the newly-opened font. |
| long | **index** | index of the face in the font file. |
| unsigned int | **hdpi** | the target horizontal DPI. |
| unsigned int | **vdpi** | the target vertical DPI. |
| | | |
| -------------- | ----------- | -------------------------------------------------------------------- |
| SDL_IOStream * | **src** | an SDL_IOStream to provide a font file's data. |
| bool | **closeio** | true to close `src` when the font is closed, false to leave it open. |
| int | **ptsize** | point size to use for the newly-opened font. |
| long | **index** | index of the face in the font file. |
| unsigned int | **hdpi** | the target horizontal DPI. |
| unsigned int | **vdpi** | the target vertical DPI. |
## Return Value
Expand All @@ -37,9 +37,8 @@ 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.
If `closeio` is SDL_TRUE `src` will be automatically closed once the font
is closed. Otherwise you should close `src` yourself after closing the
font.
If `closeio` is true `src` will be automatically closed once the font is
closed. Otherwise you should close `src` yourself after closing the font.
Some fonts have multiple "faces" included. The index specifies which face
to use from the font file. Font files with only one face should specify
Expand Down
19 changes: 9 additions & 10 deletions SDL3_ttf/TTF_OpenFontIndexIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
TTF_Font * TTF_OpenFontIndexIO(SDL_IOStream *src, SDL_bool closeio, int ptsize, long index);
TTF_Font * TTF_OpenFontIndexIO(SDL_IOStream *src, bool closeio, int ptsize, long index);
```
## Function Parameters
| | | |
| -------------- | ----------- | ---------------------------------------------------------------------------- |
| SDL_IOStream * | **src** | an SDL_IOStream to provide a font file's data. |
| SDL_bool | **closeio** | SDL_TRUE to close `src` when the font is closed, SDL_FALSE to leave it open. |
| int | **ptsize** | point size to use for the newly-opened font. |
| long | **index** | index of the face in the font file. |
| | | |
| -------------- | ----------- | -------------------------------------------------------------------- |
| SDL_IOStream * | **src** | an SDL_IOStream to provide a font file's data. |
| bool | **closeio** | true to close `src` when the font is closed, false to leave it open. |
| int | **ptsize** | point size to use for the newly-opened font. |
| long | **index** | index of the face in the font file. |
## Return Value
Expand All @@ -33,9 +33,8 @@ 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.
If `closeio` is SDL_TRUE `src` will be automatically closed once the font
is closed. Otherwise you should close `src` yourself after closing the
font.
If `closeio` is true `src` will be automatically closed once the font is
closed. Otherwise you should close `src` yourself after closing the font.
Some fonts have multiple "faces" included. The index specifies which face
to use from the font file. Font files with only one face should specify
Expand Down
6 changes: 3 additions & 3 deletions SDL3_ttf/TTF_SetFontDirection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/mai
## Syntax

```c
SDL_bool TTF_SetFontDirection(TTF_Font *font, TTF_Direction direction);
bool TTF_SetFontDirection(TTF_Font *font, TTF_Direction direction);
```
## Function Parameters
Expand All @@ -22,8 +22,8 @@ SDL_bool TTF_SetFontDirection(TTF_Font *font, TTF_Direction direction);
## Return Value
(SDL_bool) Returns SDL_TRUE on success or SDL_FALSE on failure; call
SDL_GetError() for more information.
(bool) Returns true on success or false on failure; call SDL_GetError() for
more information.
## Remarks
Expand Down
Loading

0 comments on commit fd6dbb9

Please sign in to comment.