diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-13 15:07:12 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-13 15:07:19 +0200 |
commit | b8673100bd8d02dcfc997260fd6dc297287b8c71 (patch) | |
tree | 528995941e16c0ea60db51253b92377a55846ae1 | |
parent | 25b0f18eaf4ad71bf4a5fdb40465768a183ddc4e (diff) |
Text: No scaling for text glyphs
-rw-r--r-- | src/ui/text.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { | |||
384 | pushBack_Array(&d->cacheRows, &(iCacheRow){ .height = 0 }); | 384 | pushBack_Array(&d->cacheRows, &(iCacheRow){ .height = 0 }); |
385 | } | 385 | } |
386 | d->cacheBottom = 0; | 386 | d->cacheBottom = 0; |
387 | SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0"); | ||
387 | d->cache = SDL_CreateTexture(d->render, | 388 | d->cache = SDL_CreateTexture(d->render, |
388 | SDL_PIXELFORMAT_RGBA4444, | 389 | SDL_PIXELFORMAT_RGBA4444, |
389 | SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, | 390 | SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, |
@@ -1231,6 +1232,7 @@ iDefineTypeConstructionArgs(TextBuf, (int font, const char *text), font, text) | |||
1231 | void init_TextBuf(iTextBuf *d, int font, const char *text) { | 1232 | void init_TextBuf(iTextBuf *d, int font, const char *text) { |
1232 | SDL_Renderer *render = text_.render; | 1233 | SDL_Renderer *render = text_.render; |
1233 | d->size = advance_Text(font, text); | 1234 | d->size = advance_Text(font, text); |
1235 | SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0"); | ||
1234 | d->texture = SDL_CreateTexture(render, | 1236 | d->texture = SDL_CreateTexture(render, |
1235 | SDL_PIXELFORMAT_RGBA4444, | 1237 | SDL_PIXELFORMAT_RGBA4444, |
1236 | SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, | 1238 | SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, |