SDL_ttf: Renamed functions to match SDL 3.0 naming conventions

From 5dbbe3c115d2bf300c68bd7f30f177a119a9b9ad Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 26 Sep 2024 19:23:09 -0700
Subject: [PATCH] Renamed functions to match SDL 3.0 naming conventions

---
 build-scripts/SDL_migration.cocci | 77 ++++++++++++++++++++++++++
 docs/README-migration.md          | 18 +++++++
 examples/glfont.c                 |  2 +-
 examples/showfont.c               |  2 +-
 examples/testapp.c                |  2 +-
 include/SDL3_ttf/SDL_ttf.h        | 90 +++++++++++++++----------------
 src/SDL_ttf.c                     | 56 +++++++++----------
 src/SDL_ttf.sym                   | 26 ++++-----
 8 files changed, 182 insertions(+), 91 deletions(-)

diff --git a/build-scripts/SDL_migration.cocci b/build-scripts/SDL_migration.cocci
index 6f4f67ea..df7daba6 100644
--- a/build-scripts/SDL_migration.cocci
+++ b/build-scripts/SDL_migration.cocci
@@ -83,3 +83,80 @@
 - TTF_RenderGlyph32_LCD
 + TTF_RenderGlyph_LCD
   (...)
+@@
+@@
+- TTF_WRAPPED_ALIGN_LEFT
++ TTF_HORIZONTAL_ALIGN_LEFT
+@@
+@@
+- TTF_WRAPPED_ALIGN_CENTER
++ TTF_HORIZONTAL_ALIGN_CENTER
+@@
+@@
+- TTF_WRAPPED_ALIGN_RIGHT
++ TTF_HORIZONTAL_ALIGN_RIGHT
+@@
+@@
+- TTF_GetFontWrappedAlign
++ TTF_GetFontWrapAlignment
+  (...)
+@@
+@@
+- TTF_SetFontWrappedAlign
++ TTF_SetFontWrapAlignment
+  (...)
+@@
+@@
+- TTF_FontHeight
++ TTF_GetFontHeight
+  (...)
+@@
+@@
+- TTF_FontAscent
++ TTF_GetFontAscent
+  (...)
+@@
+@@
+- TTF_FontDescent
++ TTF_GetFontDescent
+  (...)
+@@
+@@
+- TTF_FontLineSkip
++ TTF_GetFontLineSkip
+  (...)
+@@
+@@
+- TTF_FontFaces
++ TTF_GetNumFontFaces
+  (...)
+@@
+@@
+- TTF_FontFaceIsFixedWidth
++ TTF_FontIsFixedWidth
+  (...)
+@@
+@@
+- TTF_FontFaceFamilyName
++ TTF_GetFontFamilyName
+  (...)
+@@
+@@
+- TTF_FontFaceStyleName
++ TTF_GetFontStyleName
+  (...)
+@@
+@@
+- TTF_GlyphIsProvided
++ TTF_FontHasGlyph
+  (...)
+@@
+@@
+- TTF_GlyphMetrics
++ TTF_GetGlyphMetrics
+  (...)
+@@
+@@
+- TTF_IsFontScalable
++ TTF_FontIsScalable
+  (...)
diff --git a/docs/README-migration.md b/docs/README-migration.md
index c3397373..59df1fa4 100644
--- a/docs/README-migration.md
+++ b/docs/README-migration.md
@@ -37,8 +37,20 @@ Several functions have been renamed. We have provided a handy semantic patch to
 In general we have switched to using UTF8 in the API. Functions which had 3 variants, for Latin-1, UTF-8, and UCS2, now accept UTF-8 text. In addition, those functions now have an optional length parameter which allows you to render substrings.
 
 The following functions have been renamed:
+* TTF_FontAscent() => TTF_GetFontAscent()
+* TTF_FontDescent() => TTF_GetFontDescent()
+* TTF_FontFaceFamilyName() => TTF_GetFontFamilyName()
+* TTF_FontFaceIsFixedWidth() => TTF_FontIsFixedWidth()
+* TTF_FontFaceStyleName() => TTF_GetFontStyleName()
+* TTF_FontFaces() => TTF_GetNumFontFaces()
+* TTF_FontHeight() => TTF_GetFontHeight()
+* TTF_FontLineSkip() => TTF_GetFontLineSkip()
+* TTF_GetFontWrappedAlign() => TTF_GetFontWrapAlignment()
+* TTF_GlyphIsProvided() => TTF_FontHasGlyph()
 * TTF_GlyphIsProvided32() => TTF_GlyphIsProvided()
+* TTF_GlyphMetrics() => TTF_GetGlyphMetrics()
 * TTF_GlyphMetrics32() => TTF_GlyphMetrics()
+* TTF_IsFontScalable() => TTF_FontIsScalable()
 * TTF_MeasureUTF8() => TTF_MeasureText()
 * TTF_RenderGlyph32_Blended() => TTF_RenderGlyph_Blended()
 * TTF_RenderGlyph32_LCD() => TTF_RenderGlyph_LCD()
@@ -52,6 +64,7 @@ The following functions have been renamed:
 * TTF_RenderUTF8_Shaded_Wrapped() => TTF_RenderText_Shaded_Wrapped()
 * TTF_RenderUTF8_Solid() => SDL_RenderText_Solid()
 * TTF_RenderUTF8_Solid_Wrapped() => TTF_RenderText_Solid_Wrapped()
+* TTF_SetFontWrappedAlign() => TTF_SetFontWrapAlignment()
 * TTF_SizeUTF8() => TTF_SizeText()
 
 The following functions have been removed:
@@ -74,3 +87,8 @@ The following functions have been removed:
 * TTF_RenderUNICODE_Solid()
 * TTF_RenderUNICODE_Solid_Wrapped()
 * TTF_SizeUNICODE()
+The following symbols have been renamed:
+* TTF_WRAPPED_ALIGN_CENTER => TTF_HORIZONTAL_ALIGN_CENTER
+* TTF_WRAPPED_ALIGN_LEFT => TTF_HORIZONTAL_ALIGN_LEFT
+* TTF_WRAPPED_ALIGN_RIGHT => TTF_HORIZONTAL_ALIGN_RIGHT
+
diff --git a/examples/glfont.c b/examples/glfont.c
index 20d59c79..e8c9d339 100644
--- a/examples/glfont.c
+++ b/examples/glfont.c
@@ -325,7 +325,7 @@ int main(int argc, char *argv[])
     w = text->w;
     h = text->h;
     printf("Font is generally %d big, and string is %d big\n",
-                        TTF_FontHeight(font), text->h);
+                        TTF_GetFontHeight(font), text->h);
 
     /* Convert the text into an OpenGL texture */
     glGetError();
diff --git a/examples/showfont.c b/examples/showfont.c
index 335c5110..64f6eed0 100644
--- a/examples/showfont.c
+++ b/examples/showfont.c
@@ -298,7 +298,7 @@ int main(int argc, char *argv[])
     scene.messageRect.h = (float)text->h;
     scene.message = SDL_CreateTextureFromSurface(renderer, text);
     SDL_Log("Font is generally %d big, and string is %d big\n",
-                        TTF_FontHeight(font), text->h);
+                        TTF_GetFontHeight(font), text->h);
 
     draw_scene(renderer, &scene);
 
diff --git a/examples/testapp.c b/examples/testapp.c
index e2b9f951..95f58298 100644
--- a/examples/testapp.c
+++ b/examples/testapp.c
@@ -972,7 +972,7 @@ int main(void)
           } else {
 
 #if defined(HAVE_WRAP_ALIGN)
-             TTF_SetFontWrappedAlign(font, w_align);
+             TTF_SetFontWrapAlignment(font, w_align);
 #endif
 
 
diff --git a/include/SDL3_ttf/SDL_ttf.h b/include/SDL3_ttf/SDL_ttf.h
index 2346aecd..323563b5 100644
--- a/include/SDL3_ttf/SDL_ttf.h
+++ b/include/SDL3_ttf/SDL_ttf.h
@@ -409,21 +409,21 @@ extern SDL_DECLSPEC int SDLCALL TTF_GetFontHinting(const TTF_Font *font);
 extern SDL_DECLSPEC void SDLCALL TTF_SetFontHinting(TTF_Font *font, int hinting);
 
 /**
- * Special layout option for rendering wrapped text
+ * The horizontal alignment used when rendering wrapped text.
+ *
+ * \since This enum is available since SDL 3.0.0.
  */
-#define TTF_WRAPPED_ALIGN_LEFT      0
-#define TTF_WRAPPED_ALIGN_CENTER    1
-#define TTF_WRAPPED_ALIGN_RIGHT     2
+typedef enum TTF_HorizontalAlignment
+{
+    TTF_HORIZONTAL_ALIGN_INVALID = -1,
+    TTF_HORIZONTAL_ALIGN_LEFT,
+    TTF_HORIZONTAL_ALIGN_CENTER,
+    TTF_HORIZONTAL_ALIGN_RIGHT
+} TTF_HorizontalAlignment;
 
 /**
  * Query a font's current wrap alignment option.
  *
- * The wrap alignment option can be one of the following:
- *
- * - `TTF_WRAPPED_ALIGN_LEFT`
- * - `TTF_WRAPPED_ALIGN_CENTER`
- * - `TTF_WRAPPED_ALIGN_RIGHT`
- *
  * \param font the font to query.
  * \returns the font's current wrap alignment option.
  *
@@ -431,19 +431,13 @@ extern SDL_DECLSPEC void SDLCALL TTF_SetFontHinting(TTF_Font *font, int hinting)
  *
  * \since This function is available since SDL_ttf 3.0.0.
  *
- * \sa TTF_SetFontWrappedAlign
+ * \sa TTF_SetFontWrapAlignment
  */
-extern SDL_DECLSPEC int SDLCALL TTF_GetFontWrappedAlign(const TTF_Font *font);
+extern SDL_DECLSPEC TTF_HorizontalAlignment SDLCALL TTF_GetFontWrapAlignment(const TTF_Font *font);
 
 /**
  * Set a font's current wrap alignment option.
  *
- * The wrap alignment option can be one of the following:
- *
- * - `TTF_WRAPPED_ALIGN_LEFT`
- * - `TTF_WRAPPED_ALIGN_CENTER`
- * - `TTF_WRAPPED_ALIGN_RIGHT`
- *
  * \param font the font to set a new wrap alignment option on.
  * \param align the new wrap alignment option.
  *
@@ -451,9 +445,9 @@ extern SDL_DECLSPEC int SDLCALL TTF_GetFontWrappedAlign(const TTF_Font *font);
  *
  * \since This function is available since SDL_ttf 3.0.0.
  *
- * \sa TTF_GetFontWrappedAlign
+ * \sa TTF_GetFontWrapAlignment
  */
-extern SDL_DECLSPEC void SDLCALL TTF_SetFontWrappedAlign(TTF_Font *font, int align);
+extern SDL_DECLSPEC void SDLCALL TTF_SetFontWrapAlignment(TTF_Font *font, TTF_HorizontalAlignment align);
 
 /**
  * Query the total height of a font.
@@ -467,7 +461,7 @@ extern SDL_DECLSPEC void SDLCALL TTF_SetFontWrappedAlign(TTF_Font *font, int ali
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC int SDLCALL TTF_FontHeight(const TTF_Font *font);
+extern SDL_DECLSPEC int SDLCALL TTF_GetFontHeight(const TTF_Font *font);
 
 /**
  * Query the offset from the baseline to the top of a font.
@@ -481,7 +475,7 @@ extern SDL_DECLSPEC int SDLCALL TTF_FontHeight(const TTF_Font *font);
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC int SDLCALL TTF_FontAscent(const TTF_Font *font);
+extern SDL_DECLSPEC int SDLCALL TTF_GetFontAscent(const TTF_Font *font);
 
 /**
  * Query the offset from the baseline to the bottom of a font.
@@ -495,7 +489,7 @@ extern SDL_DECLSPEC int SDLCALL TTF_FontAscent(const TTF_Font *font);
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC int SDLCALL TTF_FontDescent(const TTF_Font *font);
+extern SDL_DECLSPEC int SDLCALL TTF_GetFontDescent(const TTF_Font *font);
 
 /**
  * Query the recommended spacing between lines of text for a font.
@@ -507,7 +501,7 @@ extern SDL_DECLSPEC int SDLCALL TTF_FontDescent(const TTF_Font *font);
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC int SDLCALL TTF_FontLineSkip(const TTF_Font *font);
+extern SDL_DECLSPEC int SDLCALL TTF_GetFontLineSkip(const TTF_Font *font);
 
 /**
  * Query whether or not kerning is enabled for a font.
@@ -548,7 +542,7 @@ extern SDL_DECLSPEC void SDLCALL TTF_SetFontKerning(TTF_Font *font, bool enabled
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC long SDLCALL TTF_FontFaces(const TTF_Font *font);
+extern SDL_DECLSPEC int SDLCALL TTF_GetNumFontFaces(const TTF_Font *font);
 
 /**
  * Query whether a font is fixed-width.
@@ -566,7 +560,24 @@ extern SDL_DECLSPEC long SDLCALL TTF_FontFaces(const TTF_Font *font);
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC bool SDLCALL TTF_FontFaceIsFixedWidth(const TTF_Font *font);
+extern SDL_DECLSPEC bool SDLCALL TTF_FontIsFixedWidth(const TTF_Font *font);
+
+/**
+ * Query whether a font is scalable or not.
+ *
+ * Scalability lets us distinguish between outline and bitmap fonts.
+ *
+ * \param font the font to query
+ *
+ * \returns true if the font is scalable, false otherwise.
+ *
+ * \threadsafety It is safe to call this function from any thread.
+ *
+ * \since This function is available since SDL_ttf 3.0.0.
+ *
+ * \sa TTF_SetFontSDF
+ */
+extern SDL_DECLSPEC bool TTF_FontIsScalable(const TTF_Font *font);
 
 /**
  * Query a font's family name.
@@ -584,7 +595,7 @@ extern SDL_DECLSPEC bool SDLCALL TTF_FontFaceIsFixedWidth(const TTF_Font *font);
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC const char * SDLCALL TTF_FontFaceFamilyName(const TTF_Font *font);
+extern SDL_DECLSPEC const char * SDLCALL TTF_GetFontFamilyName(const TTF_Font *font);
 
 /**
  * Query a font's style name.
@@ -602,7 +613,7 @@ extern SDL_DECLSPEC const char * SDLCALL TTF_FontFaceFamilyName(const TTF_Font *
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC const char * SDLCALL TTF_FontFaceStyleName(const TTF_Font *font);
+extern SDL_DECLSPEC const char * SDLCALL TTF_GetFontStyleName(const TTF_Font *font);
 
 /**
  * Check whether a glyph is provided by the font for a 32-bit codepoint.
@@ -615,7 +626,7 @@ extern SDL_DECLSPEC const char * SDLCALL TTF_FontFaceStyleName(const TTF_Font *f
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC bool SDLCALL TTF_GlyphIsProvided(TTF_Font *font, Uint32 ch);
+extern SDL_DECLSPEC bool SDLCALL TTF_FontHasGlyph(TTF_Font *font, Uint32 ch);
 
 /**
  * Query the metrics (dimensions) of a font's 32-bit glyph.
@@ -645,7 +656,7 @@ extern SDL_DECLSPEC bool SDLCALL TTF_GlyphIsProvided(TTF_Font *font, Uint32 ch);
  *
  * \since This function is available since SDL_ttf 3.0.0.
  */
-extern SDL_DECLSPEC bool SDLCALL TTF_GlyphMetrics(TTF_Font *font, Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance);
+extern SDL_DECLSPEC bool SDLCALL TTF_GetGlyphMetrics(TTF_Font *font, Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance);
 
 /**
  * Calculate the dimensions of a rendered string of UTF-8 text.
@@ -1108,7 +1119,7 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL TTF_RenderGlyph_LCD(TTF_Font *font, Ui
  *
  * 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
+ * TTF_GetFontFamilyName() and TTF_GetFontStyleName(), are no longer valid
  * after this call, as well.
  *
  * \param font the font to dispose of.
@@ -1298,23 +1309,6 @@ extern SDL_DECLSPEC bool SDLCALL TTF_SetFontScriptName(TTF_Font *font, const cha
  */
 extern SDL_DECLSPEC bool TTF_SetFontLanguage(TTF_Font *font, const char *language_bcp47);
 
-/**
- * Query whether a font is scalable or not.
- *
- * Scalability lets us distinguish between outline and bitmap fonts.
- *
- * \param font the font to query
- *
- * \returns true if the font is scalable, false otherwise.
- *
- * \threadsafety It is safe to call this function from any thread.
- *
- * \since This function is available since SDL_ttf 3.0.0.
- *
- * \sa TTF_SetFontSDF
- */
-extern SDL_DECLSPEC bool TTF_IsFontScalable(const TTF_Font *font);
-
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 }
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index 08b9fd2d..fb6c928e 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -277,7 +277,7 @@ struct TTF_Font {
     bool render_sdf;
 
     /* Extra layout setting for wrapped text */
-    int horizontal_align;
+    TTF_HorizontalAlignment horizontal_align;
 };
 
 /* Tell if SDL_ttf has to handle the style */
@@ -2746,28 +2746,28 @@ void TTF_CloseFont(TTF_Font *font)
     }
 }
 
-int TTF_FontHeight(const TTF_Font *font)
+int TTF_GetFontHeight(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, 0);
 
     return font->height;
 }
 
-int TTF_FontAscent(const TTF_Font *font)
+int TTF_GetFontAscent(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, 0);
 
     return font->ascent + 2 * font->outline_val;
 }
 
-int TTF_FontDescent(const TTF_Font *font)
+int TTF_GetFontDescent(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, 0);
 
     return font->descent;
 }
 
-int TTF_FontLineSkip(const TTF_Font *font)
+int TTF_GetFontLineSkip(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, 0);
 
@@ -2793,42 +2793,42 @@ void TTF_SetFontKerning(TTF_Font *font, bool enabled)
 #endif
 }
 
-long TTF_FontFaces(const TTF_Font *font)
+int TTF_GetNumFontFaces(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, 0);
 
-    return font->face->num_faces;
+    return (int)font->face->num_faces;
 }
 
-bool TTF_FontFaceIsFixedWidth(const TTF_Font *font)
+bool TTF_FontIsFixedWidth(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, false);
 
     return FT_IS_FIXED_WIDTH(font->face);
 }
 
-const char *TTF_FontFaceFamilyName(const TTF_Font *font)
+const char *TTF_GetFontFamilyName(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, NULL);
 
     return font->face->family_name;
 }
 
-const char *TTF_FontFaceStyleName(const TTF_Font *font)
+const char *TTF_GetFontStyleName(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, NULL);
 
     return font->face->style_name;
 }
 
-bool TTF_GlyphIsProvided(TTF_Font *font, Uint32 ch)
+bool TTF_FontHasGlyph(TTF_Font *font, Uint32 ch)
 {
     TTF_CHECK_FONT(font, false);
 
     return (get_char_index(font, ch) > 0);
 }
 
-bool TTF_GlyphMetrics(TTF_Font *font, Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance)
+bool TTF_GetGlyphMetrics(TTF_Font *font, Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance)
 {
     c_glyph *glyph;
 
@@ -3481,7 +3481,7 @@ static SDL_Surface* TTF_Render_Wrapped_Internal(TTF_Font *font, const char *text
         } while (textlen > 0);
     }
 
-    lineskip = TTF_FontLineSkip(font);
+    lineskip = TTF_GetFontLineSkip(font);
     rowHeight = SDL_max(height, lineskip);
 
     if (wrapLength == 0) {
@@ -3516,7 +3516,7 @@ static SDL_Surface* TTF_Render_Wrapped_Internal(TTF_Font *font, const char *text
             width = SDL_max(width, 1);
         }
     } else {
-        if (numLines <= 1 && font->horizontal_align == TTF_WRAPPED_ALIGN_LEFT) {
+        if (numLines <= 1 && font->horizontal_align == TTF_HORIZONTAL_ALIGN_LEFT) {
             /* Don't go above wrapLength if you have only 1 line which hasn't been cut */
             width = SDL_min((int)wrapLength, width);
         } else {
@@ -3567,9 +3567,9 @@ static SDL_Surface* TTF_Render_Wrapped_Internal(TTF_Font *font, const char *text
         ystart += i * lineskip;
 
         /* Control left/right/center align of each bit of text */
-        if (font->horizontal_align == TTF_WRAPPED_ALIGN_RIGHT) {
+        if (font->horizontal_align == TTF_HORIZONTAL_ALIGN_RIGHT) {
             xoffset = width - line_width;
-        } else if (font->horizontal_align == TTF_WRAPPED_ALIGN_CENTER) {
+        } else if (font->horizontal_align == TTF_HORIZONTAL_ALIGN_CENTER) {
             xoffset = width / 2 - line_width / 2;
         } else {
             xoffset = 0;
@@ -3789,23 +3789,25 @@ bool TTF_GetFontSDF(const TTF_Font *font)
     return font->render_sdf;
 }
 
-void TTF_SetFontWrappedAlign(TTF_Font *font, int align)
+void TTF_SetFontWrapAlignment(TTF_Font *font, TTF_HorizontalAlignment align)
 {
     TTF_CHECK_FONT(font,);
 
-    /* input not checked, unknown values assumed to be TTF_WRAPPED_ALIGN_LEFT */
-    if (align == TTF_WRAPPED_ALIGN_CENTER) {
-        font->horizontal_align = TTF_WRAPPED_ALIGN_CENTER;
-    } else if (align == TTF_WRAPPED_ALIGN_RIGHT) {
-        font->horizontal_align = TTF_WRAPPED_ALIGN_RIGHT;
-    } else {
-        font->horizontal_align = TTF_WRAPPED_ALIGN_LEFT;
+    switch (align) {
+    case TTF_HORIZONTAL_ALIGN_LEFT:
+    case TTF_HORIZONTAL_ALIGN_CENTER:
+    case TTF_HORIZONTAL_ALIGN_RIGHT:
+        font->horizontal_align = align;
+        break;
+    default:
+        // Ignore invalid values
+        break;
     }
 }
 
-int TTF_GetFontWrappedAlign(const TTF_Font *font)
+TTF_HorizontalAlignment TTF_GetFontWrapAlignment(const TTF_Font *font)
 {
-    TTF_CHECK_FONT(font,-1);
+    TTF_CHECK_FONT(font, TTF_HORIZONTAL_ALIGN_INVALID);
 
     return font->horizontal_align;
 }
@@ -3878,7 +3880,7 @@ bool TTF_GetGlyphKerning(TTF_Font *font, Uint32 previous_ch, Uint32 ch, int *ker
     return true;
 }
 
-bool TTF_IsFontScalable(const TTF_Font *font)
+bool TTF_FontIsScalable(const TTF_Font *font)
 {
     TTF_CHECK_FONT(font, false);
 
diff --git a/src/SDL_ttf.sym b/src/SDL_ttf.sym
index 06e57b9e..c746ffb1 100644
--- a/src/SDL_ttf.sym
+++ b/src/SDL_ttf.sym
@@ -1,27 +1,27 @@
 SDL3_ttf_0.0.0 {
   global:
     TTF_CloseFont;
-    TTF_FontAscent;
-    TTF_FontDescent;
-    TTF_FontFaceFamilyName;
-    TTF_FontFaceIsFixedWidth;
-    TTF_FontFaceStyleName;
-    TTF_FontFaces;
-    TTF_FontHeight;
-    TTF_FontLineSkip;
+    TTF_FontHasGlyph;
+    TTF_FontIsFixedWidth;
+    TTF_FontIsScalable;
+    TTF_GetFontAscent;
+    TTF_GetFontDescent;
+    TTF_GetFontFamilyName;
+    TTF_GetFontHeight;
     TTF_GetFontHinting;
     TTF_GetFontKerning;
+    TTF_GetFontLineSkip;
     TTF_GetFontOutline;
     TTF_GetFontSDF;
     TTF_GetFontStyle;
-    TTF_GetFontWrappedAlign;
+    TTF_GetFontStyleName;
+    TTF_GetFontWrapAlignment;
     TTF_GetFreeTypeVersion;
     TTF_GetGlyphKerning;
+    TTF_GetGlyphMetrics;
     TTF_GetHarfBuzzVersion;
-    TTF_GlyphIsProvided;
-    TTF_GlyphMetrics;
+    TTF_GetNumFontFaces;
     TTF_Init;
-    TTF_IsFontScalable;
     TTF_MeasureText;
     TTF_OpenFont;
     TTF_OpenFontIO;
@@ -49,7 +49,7 @@ SDL3_ttf_0.0.0 {
     TTF_SetFontSize;
     TTF_SetFontSizeDPI;
     TTF_SetFontStyle;
-    TTF_SetFontWrappedAlign;
+    TTF_SetFontWrapAlignment;
     TTF_SizeText;
     TTF_Version;
     TTF_WasInit;