Terminology supports the Encircled escape sequence!


I was looking into TrueColor support for Terminology. It won't support it fully but it does approximate those TrueColors to a palette of 256 colors. It should do it better than XTerm since it is not using a dumb euclidean distance to compute color distance but something a bit more complex: the last formula on the Euclidean chapter on Color Distance on wikipedia.

I looked a bit more on those escape codes defined in ITU T.416 or ISO 8613 and those TrueColors can be defined as RGB, CMY and CMYK. Terminology supports all of them (and might be the only one) but still does color approximation though.


That's when I stumbled on the Encircled escape sequence.

3 years ago, I added support for the Fraktur escape sequence to terminology. And I just did the same for Encircled characters.

Unicode provides characters that are encircled in the Enclosed Alphanumerics block.

I did the same trick: translate the characters a-z, A-Z, 0-9 to their relative enclosed characters.

If you follow the git version, you can try it like that:

echo "\033[52mabcdefghijklmnopqrstuvwxyz\n\033[0m"

I'm still using PragmataPro, but it only supports p enclosed. The other characters are rendered using Symbola (this is transparent to the user). Here's how it renders for me: terminology rendering some encircled characters