SDL_ttf: Remove deprecated TTF_SetDirection

From 3226990789eb281ec912e177f9d975a7c5ed5148 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 8 Sep 2023 00:37:36 +0200
Subject: [PATCH] Remove deprecated TTF_SetDirection

---
 include/SDL3_ttf/SDL_ttf.h | 27 ---------------------------
 src/SDL_ttf.c              | 12 ------------
 src/SDL_ttf.sym            |  1 -
 3 files changed, 40 deletions(-)

diff --git a/include/SDL3_ttf/SDL_ttf.h b/include/SDL3_ttf/SDL_ttf.h
index 205b81a6..db57fa3f 100644
--- a/include/SDL3_ttf/SDL_ttf.h
+++ b/include/SDL3_ttf/SDL_ttf.h
@@ -2201,30 +2201,6 @@ typedef enum
   TTF_DIRECTION_BTT         /* Bottom to Top */
 } TTF_Direction;
 
-/**
- * Set a global direction to be used for text shaping.
- *
- * \deprecated This function expects an hb_direction_t value, from HarfBuzz,
- *             cast to an int, and affects all fonts globally. Please use
- *             TTF_SetFontDirection() instead, which uses an enum supplied by
- *             SDL_ttf itself and operates on a per-font basis.
- *
- *             This is a global setting; fonts will favor a value set with
- *             TTF_SetFontDirection(), but if they have not had one explicitly
- *             set, they will use the value specified here.
- *
- *             The default value is `HB_DIRECTION_LTR` (left-to-right text
- *             flow).
- *
- * \param direction an hb_direction_t value.
- * \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_SetFontDirection
- */
-extern SDL_DEPRECATED DECLSPEC int SDLCALL TTF_SetDirection(int direction); /* hb_direction_t */
-
 /**
  * Set a global script to be used for text shaping.
  *
@@ -2251,9 +2227,6 @@ extern SDL_DEPRECATED DECLSPEC int SDLCALL TTF_SetScript(int script); /* hb_scri
 /**
  * Set direction to be used for text shaping by a font.
  *
- * Any value supplied here will override the global direction set with the
- * deprecated TTF_SetDirection().
- *
  * Possible direction values are:
  *
  * - `TTF_DIRECTION_LTR` (Left to Right)
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index 1c7213f3..ef9c335d 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -87,18 +87,6 @@ static hb_direction_t g_hb_direction = HB_DIRECTION_LTR;
 static hb_script_t    g_hb_script = HB_SCRIPT_UNKNOWN;
 #endif
 
-/* Harfbuzz */
-int TTF_SetDirection(int direction) /* hb_direction_t */
-{
-#if TTF_USE_HARFBUZZ
-    g_hb_direction = direction;
-    return 0;
-#else
-    (void) direction;
-    return -1;
-#endif
-}
-
 int TTF_SetScript(int script) /* hb_script_t */
 {
 #if TTF_USE_HARFBUZZ
diff --git a/src/SDL_ttf.sym b/src/SDL_ttf.sym
index b013cf0a..3c3ec5b0 100644
--- a/src/SDL_ttf.sym
+++ b/src/SDL_ttf.sym
@@ -71,7 +71,6 @@ SDL3_ttf_0.0.0 {
     TTF_RenderUTF8_Shaded_Wrapped;
     TTF_RenderUTF8_Solid;
     TTF_RenderUTF8_Solid_Wrapped;
-    TTF_SetDirection;
     TTF_SetFontDirection;
     TTF_SetFontHinting;
     TTF_SetFontKerning;