@@ -72,7 +72,7 @@ interface
7272const
7373 SDL_TTF_MAJOR_VERSION = 2 ;
7474 SDL_TTF_MINOR_VERSION = 0 ;
75- SDL_TTF_PATCHLEVEL = 12 ;
75+ SDL_TTF_PATCHLEVEL = 15 ;
7676
7777Procedure SDL_TTF_VERSION (Out X:TSDL_Version);
7878
@@ -81,7 +81,6 @@ interface
8181 TTF_MAJOR_VERSION = SDL_TTF_MAJOR_VERSION;
8282 TTF_MINOR_VERSION = SDL_TTF_MINOR_VERSION;
8383 TTF_PATCHLEVEL = SDL_TTF_PATCHLEVEL;
84- // TTF_VERSION(X) = SDL_TTF_VERSION(X);
8584
8685 { * This function gets the version of the dynamically linked SDL_ttf library.
8786 it should NOT be used to fill a version structure, instead you should
@@ -261,8 +260,21 @@ procedure TTF_Quit() cdecl; external TTF_LibName {$IFDEF DELPHI} {$IFDEF MACOS}
261260{ * Check if the TTF engine is initialized *}
262261function TTF_WasInit : Boolean cdecl; external TTF_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _TTF_WasInit' { $ENDIF} { $ENDIF} ;
263262
263+ { * Get the kerning size of two glyphs
264+
265+ DEPRECATED: this function requires FreeType font indexes, not glyphs,
266+ by accident, which we don't expose through this API, so it could give
267+ wildly incorrect results, especially with non-ASCII values.
268+ Going forward, please use TTF_GetFontKerningSizeGlyphs() instead, which
269+ does what you probably expected this function to do.
270+ *}
271+ function TTF_GetFontKerningSize (font: PTTF_Font; prev_index, index: Integer): Integer cdecl;
272+ external TTF_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _TTF_GetFontKerningSize' { $ENDIF} { $ENDIF} ;
273+ deprecated ' This function requires FreeType font indexes, not glyphs. Use TTF_GetFontKerningSizeGlyphs() instead' ;
274+
264275{ * Get the kerning size of two glyphs *}
265- function TTF_GetFontKerningSize (font: PTTF_Font; prev_index, index: Integer): Integer cdecl; external TTF_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _TTF_GetFontKerningSize' { $ENDIF} { $ENDIF} ;
276+ function TTF_GetFontKerningSizeGlyphs (font: PTTF_Font; previous_ch, ch: UInt16): Integer cdecl;
277+ external TTF_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _TTF_GetFontKerningSizeGlyphs' { $ENDIF} { $ENDIF} ;
266278
267279{ * We'll use SDL for reporting errors *}
268280function TTF_SetError (const fmt: PAnsiChar): SInt32; cdecl;
0 commit comments