SDL_ttf: The font properties always exist

From 47fbfaf8e9aea5fac959a6c0239fca8eefc3a4b2 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 27 Sep 2024 13:18:54 -0700
Subject: [PATCH] The font properties always exist

---
 src/SDL_ttf.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index fc8ec56c..0c64c0e0 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -1889,16 +1889,6 @@ TTF_Font *TTF_OpenFontWithProperties(SDL_PropertiesID props)
     return font;
 }
 
-SDL_PropertiesID TTF_GetFontProperties(TTF_Font *font)
-{
-    TTF_CHECK_FONT(font, 0);
-
-    if (font->props == 0) {
-        font->props = SDL_CreateProperties();
-    }
-    return font->props;
-}
-
 TTF_Font *TTF_OpenFont(const char *file, float ptsize)
 {
     TTF_Font *font = NULL;
@@ -1926,6 +1916,13 @@ TTF_Font *TTF_OpenFontIO(SDL_IOStream *src, bool closeio, float ptsize)
     return font;
 }
 
+SDL_PropertiesID TTF_GetFontProperties(TTF_Font *font)
+{
+    TTF_CHECK_FONT(font, 0);
+
+    return font->props;
+}
+
 bool TTF_SetFontSizeDPI(TTF_Font *font, float ptsize, unsigned int hdpi, unsigned int vdpi)
 {
     FT_Face face = font->face;