Scroll to navigation

TTF_SetDirection(3) SDL_ttf3 FUNCTIONS TTF_SetDirection(3)

NAME

TTF_SetDirection - Set a global direction to be used for text shaping.

SYNOPSIS

#include "SDL3_ttf/SDL_ttf.h"
int TTF_SetDirection(int direction); /* hb_direction_t */

DEPRECATED

This function expects an hb_direction_t value, from HarfBuzz, cast to an int, and affects all fonts globally. Please use

TTF_SetFontDirection () instead, which uses an enum supplied by SDL_ttf itself and operates on a per-font basis.

This is a global setting; fonts will favor a value set with

TTF_SetFontDirection (), but if they have not had one explicitly set, they will use the value specified here.

The default value is HB_DIRECTION_LTR (left-to-right text flow).

FUNCTION PARAMETERS

an hb_direction_t value.

RETURN VALUE

Returns 0, or -1 if SDL_ttf is not compiled with HarfBuzz support.

AVAILABILITY

This function is available since SDL_ttf 3.0.0.

SEE ALSO

TTF_SetFontDirection(3)

SDL_ttf 3.0.0 SDL_ttf