ttfCloseFont function

void ttfCloseFont(
  1. Pointer<TtfFont> font
)

Dispose of a previously-created font.

Call this when done with a font. This function will free any resources associated with it. It is safe to call this function on NULL, for example on the result of a failed call to TTF_OpenFont().

The font is not valid after being passed to this function. String pointers from functions that return information on this font, such as TTF_FontFaceFamilyName() and TTF_FontFaceStyleName(), are no longer valid after this call, as well.

\param font the font to dispose of.

\since This function is available since SDL_ttf 2.0.12.

\sa TTF_OpenFont \sa TTF_OpenFontIndexDPIRW \sa TTF_OpenFontRW \sa TTF_OpenFontDPI \sa TTF_OpenFontDPIRW \sa TTF_OpenFontIndex \sa TTF_OpenFontIndexDPI \sa TTF_OpenFontIndexDPIRW \sa TTF_OpenFontIndexRW

extern DECLSPEC void SDLCALL TTF_CloseFont(TTF_Font *font)

Implementation

void ttfCloseFont(Pointer<TtfFont> font) {
  final ttfCloseFontLookupFunction = libSdl2Ttf.lookupFunction<
      Void Function(Pointer<TtfFont> font),
      void Function(Pointer<TtfFont> font)>('TTF_CloseFont');
  return ttfCloseFontLookupFunction(font);
}