From 3adac8ac7ca3be6a5f73a23d930c9f7449f99189 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 20 Oct 2024 16:01:36 -0700 Subject: [PATCH] Don't use linear interpolation for text We're not scaling it, so nearest sampling will give the clearest text. --- src/SDL_renderer_textengine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SDL_renderer_textengine.c b/src/SDL_renderer_textengine.c index d8e53663..8ae21e2e 100644 --- a/src/SDL_renderer_textengine.c +++ b/src/SDL_renderer_textengine.c @@ -193,6 +193,7 @@ static AtlasTexture *CreateAtlas(SDL_Renderer *renderer) DestroyAtlas(atlas); return NULL; } + SDL_SetTextureScaleMode(atlas->texture, SDL_SCALEMODE_NEAREST); int num_nodes = ATLAS_TEXTURE_SIZE / 4; atlas->packing_nodes = (stbrp_node *)SDL_calloc(num_nodes, sizeof(*atlas->packing_nodes));