diff -r f28f7b0f72ae SDL_ttf.c --- a/SDL_ttf.c Sat Oct 04 11:55:45 2014 -0400 +++ b/SDL_ttf.c Mon Nov 10 05:00:19 2014 -0600 @@ -2213,21 +2213,21 @@ error = Find_Glyph(font, ch, CACHED_METRICS); if (error) { TTF_SetFTError("Couldn't find glyph", error); - return -1; + return INT_MIN; } glyph_index = font->current->index; error = Find_Glyph(font, previous_ch, CACHED_METRICS); if (error) { TTF_SetFTError("Couldn't find glyph", error); - return -1; + return INT_MIN; } prev_index = font->current->index; error = FT_Get_Kerning(font->face, prev_index, glyph_index, ft_kerning_default, &delta); if (error) { TTF_SetFTError("Couldn't get glyph kerning", error); - return -1; + return INT_MIN; } return (delta.x >> 6); } diff -r f28f7b0f72ae SDL_ttf.h --- a/SDL_ttf.h Sat Oct 04 11:55:45 2014 -0400 +++ b/SDL_ttf.h Mon Nov 10 05:00:19 2014 -0600 @@ -247,7 +247,10 @@ /* Check if the TTF engine is initialized */ extern DECLSPEC int SDLCALL TTF_WasInit(void); -/* Get the kerning size of two glyphs */ +/* Get the kerning size of two glyphs. + This function returns the kerning pair size on success, or INT_MIN on + failure. +*/ extern DECLSPEC int TTF_GetFontKerningSize(TTF_Font *font, Uint16 previous_ch, Uint16 ch); /* We'll use SDL for reporting errors */