A week ago, I added the 'term-style-control' module to gnulib.
Now, here is a new release of libtextstyle that makes use of this module:
https://alpha.gnu.org/gnu/gettext/libtextstyle-0.8.tar.gz
New in 0.8:
* Fixed a couple of reliability bugs:
- When a program exits while the terminal was in non-default state, the
library left the terminal with ECHO off.
- The SIGCONT signal handler would fail to restore the proper styling,
with a low probability.
- The SIGTSTP and SIGCONT signal handlers could clobber errno.
* Added support for Windows consoles.
* Improved support for TERM=Eterm-256color and TERM=mlterm-256color.
* Added support for terminal emulators with true-color support (16 million
colors), such as TERM=xterm-direct and TERM=konsole-direct.
* Improved documentation.
Bruno