From b8673100bd8d02dcfc997260fd6dc297287b8c71 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 13 Feb 2021 15:07:12 +0200 Subject: Text: No scaling for text glyphs --- src/ui/text.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ui') diff --git a/src/ui/text.c b/src/ui/text.c index 71a26250..016aeef1 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -384,6 +384,7 @@ static void initCache_Text_(iText *d) { pushBack_Array(&d->cacheRows, &(iCacheRow){ .height = 0 }); } d->cacheBottom = 0; + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0"); d->cache = SDL_CreateTexture(d->render, SDL_PIXELFORMAT_RGBA4444, SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, @@ -1231,6 +1232,7 @@ iDefineTypeConstructionArgs(TextBuf, (int font, const char *text), font, text) void init_TextBuf(iTextBuf *d, int font, const char *text) { SDL_Renderer *render = text_.render; d->size = advance_Text(font, text); + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0"); d->texture = SDL_CreateTexture(render, SDL_PIXELFORMAT_RGBA4444, SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, -- cgit v1.2.3