SDL_ttf: Remove deprecated TTF_SetScript

From 8e99a81e66fb12797803cc11c6288a1d8d3a7a9d Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 8 Sep 2023 00:39:26 +0200
Subject: [PATCH] Remove deprecated TTF_SetScript

---
 examples/testapp.c         |  2 --
 include/SDL3_ttf/SDL_ttf.h | 26 --------------------------
 src/SDL_ttf.c              | 11 -----------
 src/SDL_ttf.sym            |  1 -
 4 files changed, 40 deletions(-)

diff --git a/examples/testapp.c b/examples/testapp.c
index d2676d26..86962842 100644
--- a/examples/testapp.c
+++ b/examples/testapp.c
@@ -795,8 +795,6 @@ int main(void)
        }
 
        TTF_SetFontDirection(font, directions[direction].value);
-       //    TTF_SetScript(HB_SCRIPT_ARABIC);
-       //        TTF_SetScript(HB_SCRIPT_HAN);
 
        {
           int tmp;
diff --git a/include/SDL3_ttf/SDL_ttf.h b/include/SDL3_ttf/SDL_ttf.h
index db57fa3f..eb125d9a 100644
--- a/include/SDL3_ttf/SDL_ttf.h
+++ b/include/SDL3_ttf/SDL_ttf.h
@@ -2201,29 +2201,6 @@ typedef enum
   TTF_DIRECTION_BTT         /* Bottom to Top */
 } TTF_Direction;
 
-/**
- * Set a global script to be used for text shaping.
- *
- * \deprecated This function expects an hb_script_t value, from HarfBuzz, cast
- *             to an int, and affects all fonts globally. Please use
- *             TTF_SetFontScriptName() instead, which accepts a string that is
- *             converted to an equivalent int internally, and operates on a
- *             per-font basis.
- *
- *             This is a global setting; fonts will favor a value set with
- *             TTF_SetFontScriptName(), but if they have not had one
- *             explicitly set, they will use the value specified here.
- *
- *             The default value is `HB_SCRIPT_UNKNOWN`.
- *
- * \returns 0, or -1 if SDL_ttf is not compiled with HarfBuzz support.
- *
- * \since This function is available since SDL_ttf 3.0.0.
- *
- * \sa TTF_SetFontScriptName
- */
-extern SDL_DEPRECATED DECLSPEC int SDLCALL TTF_SetScript(int script); /* hb_script_t */
-
 /**
  * Set direction to be used for text shaping by a font.
  *
@@ -2247,9 +2224,6 @@ extern DECLSPEC int SDLCALL TTF_SetFontDirection(TTF_Font *font, TTF_Direction d
 /**
  * Set script to be used for text shaping by a font.
  *
- * Any value supplied here will override the global script set with the
- * deprecated TTF_SetScript().
- *
  * The supplied script value must be a null-terminated string of exactly four
  * characters.
  *
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index ef9c335d..dc7a8bfc 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -87,17 +87,6 @@ static hb_direction_t g_hb_direction = HB_DIRECTION_LTR;
 static hb_script_t    g_hb_script = HB_SCRIPT_UNKNOWN;
 #endif
 
-int TTF_SetScript(int script) /* hb_script_t */
-{
-#if TTF_USE_HARFBUZZ
-    g_hb_script = script;
-    return 0;
-#else
-    (void) script;
-    return -1;
-#endif
-}
-
 /* Round glyph to 16 bytes width and use SSE2 instructions */
 #if defined(__SSE2__)
 #  define HAVE_SSE2_INTRINSICS 1
diff --git a/src/SDL_ttf.sym b/src/SDL_ttf.sym
index 3c3ec5b0..51e97344 100644
--- a/src/SDL_ttf.sym
+++ b/src/SDL_ttf.sym
@@ -81,7 +81,6 @@ SDL3_ttf_0.0.0 {
     TTF_SetFontSizeDPI;
     TTF_SetFontStyle;
     TTF_SetFontWrappedAlign;
-    TTF_SetScript;
     TTF_SizeText;
     TTF_SizeUNICODE;
     TTF_SizeUTF8;