aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/termptygfx.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2014-04-06 14:42:38 +0200
committerBoris Faure <billiob@gmail.com>2014-04-06 14:42:38 +0200
commit02856cbdec511e08cf579b08e906499d9583f018 (patch)
tree7f105036f60cca8c2c5bf36a7b7db4d76ea63bb8 /src/bin/termptygfx.c
parentfix wrong assignement (diff)
downloadterminology-02856cbdec511e08cf579b08e906499d9583f018.tar.gz
terminology supports fraktur!!
Diffstat (limited to 'src/bin/termptygfx.c')
-rw-r--r--src/bin/termptygfx.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/bin/termptygfx.c b/src/bin/termptygfx.c
index 3a6a607..00ffabf 100644
--- a/src/bin/termptygfx.c
+++ b/src/bin/termptygfx.c
@@ -34,9 +34,9 @@ static const unsigned short vt100_to_unicode[62] =
};
Eina_Unicode
-_termpty_charset_trans(Eina_Unicode g, int chset)
+_termpty_charset_trans(Eina_Unicode g, Termstate *state)
{
- switch (chset)
+ switch (state->charsetch)
{
case '0': /* DEC Special Character & Line Drawing Set */
if ((g >= 0x41) && (g <= 0x7e) &&
@@ -49,5 +49,16 @@ _termpty_charset_trans(Eina_Unicode g, int chset)
default:
break;
}
+ if (state->att.fraktur)
+ {
+ if (g >= 'a' && g <= 'z')
+ {
+ g += 0x1d51e - 'a';
+ }
+ else if (g >= 'A' && g <= 'Z')
+ {
+ g += 0x1d504 - 'A';
+ }
+ }
return g;
}