Scroll to navigation

TTF_Init(3) SDL_ttf3 FUNCTIONS TTF_Init(3)

NAME

TTF_Init - Initialize SDL_ttf.

SYNOPSIS

#include "SDL3_ttf/SDL_ttf.h"
int TTF_Init(void);

DESCRIPTION

You must successfully call this function before it is safe to call any other function in this library, with one exception: a human-readable error message can be retrieved from TTF_GetError () if this function fails.

SDL must be initialized before calls to functions in this library, because this library uses utility functions from the SDL library.

It is safe to call this more than once; the library keeps a counter of init calls, and decrements it on each call to TTF_Quit , so you must pair your init and quit calls.

RETURN VALUE

Returns 0 on success, -1 on error.

AVAILABILITY

This function is available since SDL_ttf 3.0.0.

SEE ALSO

TTF_Quit(3)

SDL_ttf 3.0.0 SDL_ttf