ttfCopyFont function ttf
Create a copy of an existing font.
The copy will be distinct from the original, but will share the font file and have the same size and style as the original.
When done with the returned TTF_Font, use TTF_CloseFont() to dispose of it.
\param existing_font the font to copy. \returns a valid TTF_Font, or NULL on failure; call SDL_GetError() for more information.
\threadsafety This function should be called on the thread that created the original font.
\since This function is available since SDL_ttf 3.0.0.
\sa TTF_CloseFont
extern SDL_DECLSPEC TTF_Font * SDLCALL TTF_CopyFont(TTF_Font *existing_font)
Implementation
Pointer<TtfFont> ttfCopyFont(Pointer<TtfFont> existingFont) {
final ttfCopyFontLookupFunction = _libTtf
.lookupFunction<
Pointer<TtfFont> Function(Pointer<TtfFont> existingFont),
Pointer<TtfFont> Function(Pointer<TtfFont> existingFont)
>('TTF_CopyFont');
return ttfCopyFontLookupFunction(existingFont);
}