SDL Wiki
(This function is part of SDL_ttf, a separate library from SDL.)

TTF_OpenFontWithProperties

Create a font with the specified properties.

Header File

Defined in <SDL3_ttf/SDL_ttf.h>

Syntax

TTF_Font * TTF_OpenFontWithProperties(SDL_PropertiesID props);


#define TTF_PROP_FONT_CREATE_FILENAME_STRING            "SDL_ttf.font.create.filename"
#define TTF_PROP_FONT_CREATE_IOSTREAM_POINTER           "SDL_ttf.font.create.iostream"
#define TTF_PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER     "SDL_ttf.font.create.iostream.offset"
#define TTF_PROP_FONT_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN "SDL_ttf.font.create.iostream.autoclose"
#define TTF_PROP_FONT_CREATE_SIZE_FLOAT                 "SDL_ttf.font.create.size"
#define TTF_PROP_FONT_CREATE_FACE_NUMBER                "SDL_ttf.font.create.face"
#define TTF_PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER      "SDL_ttf.font.create.hdpi"
#define TTF_PROP_FONT_CREATE_VERTICAL_DPI_NUMBER        "SDL_ttf.font.create.vdpi"

Function Parameters

SDL_PropertiesID props the properties to use.

Return Value

(TTF_Font *) Returns a valid TTF_Font, or NULL on failure; call SDL_GetError() for more information.

Remarks

These are the supported properties:

Thread Safety

It is safe to call this function from any thread.

Version

This function is available since SDL_ttf 3.0.0.

See Also


CategoryAPI, CategoryAPIFunction


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.