From ccde1781a07ab418050efdfb00d9231291ce52d8 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 18 Dec 2021 16:50:44 +0200 Subject: TextBuf: Set base attributes for ANSI escapes --- 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 f3d945e4..fc552db9 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -2242,6 +2242,7 @@ void init_TextBuf(iTextBuf *d, iWrapText *wrapText, int font, int color) { SDL_Texture *oldTarget = SDL_GetRenderTarget(render); const iInt2 oldOrigin = origin_Paint; origin_Paint = zero_I2(); + setBaseAttributes_Text(font, color); SDL_SetRenderTarget(render, d->texture); SDL_SetRenderDrawBlendMode(render, SDL_BLENDMODE_NONE); SDL_SetRenderDrawColor(render, 255, 255, 255, 0); @@ -2252,6 +2253,7 @@ void init_TextBuf(iTextBuf *d, iWrapText *wrapText, int font, int color) { SDL_SetRenderTarget(render, oldTarget); origin_Paint = oldOrigin; SDL_SetTextureBlendMode(d->texture, SDL_BLENDMODE_BLEND); + setBaseAttributes_Text(-1, -1); } } -- cgit v1.2.3