diff --git a/src/bin/termpty.h b/src/bin/termpty.h index 9ad1ad68..5cac2618 100644 --- a/src/bin/termpty.h +++ b/src/bin/termpty.h @@ -64,11 +64,14 @@ struct _Termatt unsigned short autowrapped : 1; unsigned short newline : 1; unsigned short fraktur : 1; + unsigned short framed : 1; + unsigned short encircled : 1; + unsigned short overlined : 1; #if defined(SUPPORT_80_132_COLUMNS) unsigned short is_80_132_mode_allowed : 1; - unsigned short bit_padding : 14; + unsigned short bit_padding : 11; #else - unsigned short bit_padding : 15; + unsigned short bit_padding : 12; #endif }; diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index b34250bc..3cc4e204 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -847,6 +847,24 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr) ty->termstate.att.bg = COL_DEF; ty->termstate.att.bgintense = 0; break; + case 51: + WRN("TODO: support SGR 51 - framed attribute"); + ty->termstate.att.framed = 1; + break; + case 52: + ty->termstate.att.encircled = 1; + break; + case 53: + WRN("TODO: support SGR 51 - overlined attribute"); + ty->termstate.att.overlined = 1; + break; + case 54: + ty->termstate.att.framed = 0; + ty->termstate.att.encircled = 0; + break; + case 55: + ty->termstate.att.overlined = 0; + break; case 90: // fg case 91: case 92: diff --git a/src/bin/termptygfx.c b/src/bin/termptygfx.c index 79dee37e..afb71151 100644 --- a/src/bin/termptygfx.c +++ b/src/bin/termptygfx.c @@ -60,5 +60,22 @@ _termpty_charset_trans(const Termpty *ty, Eina_Unicode g) g += 0x1d504 - 'A'; } } + else if (ty->termstate.att.encircled) + { + if (g >= 'a' && g <= 'z') + { + g += 0x24d0 - 'a'; + } + else if (g >= 'A' && g <= 'Z') + { + g += 0x24b6 - 'A'; + } + else if (g >= '1' && g <= '9') + { + g += 0x2460 - '0'; + } + else if (g == '0') + g = 0x24ea; + } return g; } diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index 068ac475..5c1465aa 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -418,6 +418,9 @@ termpty_reset_att(Termatt *att) att->autowrapped = 0; att->newline = 0; att->fraktur = 0; + att->framed = 0; + att->encircled = 0; + att->overlined = 0; } void diff --git a/tools/fonts.sh b/tools/fonts.sh index 917bab82..ef4b3400 100755 --- a/tools/fonts.sh +++ b/tools/fonts.sh @@ -18,3 +18,7 @@ echo -ne "\033[3;1mABCDEFGHIJKLMNOPQRSTUVWXYZ\n\033[0m" echo -ne "\nfraktur\n" echo -ne "\033[20mabcdefghijklmnopqrstuvwxyz\n\033[0m" echo -ne "\033[20mABCDEFGHIJKLMNOPQRSTUVWXYZ\n\033[0m" + +echo -ne "\nencircled\n" +echo -ne "\033[52ma b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4\n\033[0m" +echo -ne "\033[52mA B C D E F G H I J K L M N O P Q R S T U V W X Y Z 5 6 7 8 9\n\033[0m"