From a965746611953f9a569935639144ee75d3e0c0c5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 28 Jan 2025 15:22:35 -0800
Subject: [PATCH] Increased the font glyph hashtable size
Presuming we'll need at least upper and lower case letters and punctuation, this seems like a reasonable value.
---
src/SDL_hashtable_ttf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SDL_hashtable_ttf.c b/src/SDL_hashtable_ttf.c
index e14c2560..f09f4f1d 100644
--- a/src/SDL_hashtable_ttf.c
+++ b/src/SDL_hashtable_ttf.c
@@ -54,7 +54,7 @@ static void SDL_NukeFreeGlyphHashtableKey(const void *key, const void *value, vo
SDL_HashTable *SDL_CreateGlyphHashTable(SDL_GlyphHashTable_NukeFn nukefn)
{
- const int num_buckets = 4; // FIXME: Is this a good value?
+ const int num_buckets = 32;
return SDL_CreateHashTable(nukefn, num_buckets, SDL_HashGlyphHashtableKey, SDL_KeyMatchGlyphHashtableKey, SDL_NukeFreeGlyphHashtableKey, false, false);
}