From 43e0516bd05d40678cd7b14a7502de779957bd6d Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Fri, 27 Sep 2024 21:31:09 +0200
Subject: [PATCH] Add missing implementation of TTF_GetFontProperties()
---
src/SDL_ttf.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index 5ca54d67..fc8ec56c 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -1889,6 +1889,16 @@ 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;