diff options
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index 7367e6c0..f3d945e4 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -390,12 +390,16 @@ static void deinitCache_Text_(iText *d) { | |||
390 | SDL_DestroyTexture(d->cache); | 390 | SDL_DestroyTexture(d->cache); |
391 | } | 391 | } |
392 | 392 | ||
393 | iRegExp *makeAnsiEscapePattern_Text(void) { | ||
394 | return new_RegExp("[[()][?]?([0-9;AB]*?)([ABCDEFGHJKSTfhilmn])", 0); | ||
395 | } | ||
396 | |||
393 | void init_Text(iText *d, SDL_Renderer *render) { | 397 | void init_Text(iText *d, SDL_Renderer *render) { |
394 | iText *oldActive = activeText_; | 398 | iText *oldActive = activeText_; |
395 | activeText_ = d; | 399 | activeText_ = d; |
396 | init_Array(&d->fonts, sizeof(iFont)); | 400 | init_Array(&d->fonts, sizeof(iFont)); |
397 | d->contentFontSize = contentScale_Text_; | 401 | d->contentFontSize = contentScale_Text_; |
398 | d->ansiEscape = new_RegExp("[[()][?]?([0-9;AB]*?)([ABCDEFGHJKSTfhilmn])", 0); | 402 | d->ansiEscape = makeAnsiEscapePattern_Text(); |
399 | d->baseFontId = -1; | 403 | d->baseFontId = -1; |
400 | d->baseFgColorId = -1; | 404 | d->baseFgColorId = -1; |
401 | d->missingGlyphs = iFalse; | 405 | d->missingGlyphs = iFalse; |