terminology supports fraktur!!

devs/discomfitor/cc
Boris Faure 9 years ago
parent 3d137aa3e9
commit 02856cbdec
  1. 1
      src/bin/termpty.h
  2. 6
      src/bin/termptyesc.c
  3. 15
      src/bin/termptygfx.c
  4. 4
      src/bin/termptygfx.h
  5. 5
      src/bin/termptyops.c

@ -69,6 +69,7 @@ struct _Termatt
unsigned short autowrapped : 1;
unsigned short newline : 1;
unsigned short tab : 1;
unsigned short fraktur : 1;
#if defined(SUPPORT_80_132_COLUMNS)
unsigned short is_80_132_mode_allowed : 1;
#endif

@ -162,6 +162,9 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr)
case 9: // strikethrough
ty->state.att.strike = 1;
break;
case 20: // fraktur!
ty->state.att.fraktur = 1;
break;
case 21: // no bold/bright
ty->state.att.bold = 0;
break;
@ -169,10 +172,11 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr)
ty->state.att.bold = 0;
ty->state.att.faint = 0;
break;
case 23: // no italic
case 23: // no italic, not fraktur
#if defined(SUPPORT_ITALIC)
ty->state.att.italic = 0;
#endif
ty->state.att.fraktur = 0;
break;
case 24: // no underline
ty->state.att.underline = 0;

@ -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;
}

@ -1,6 +1,8 @@
#ifndef _TERMPTY_GFX_H__
#define _TERMPTY_GFX_H__ 1
Eina_Unicode _termpty_charset_trans(Eina_Unicode g, int chset);
#include "termpty.h"
Eina_Unicode _termpty_charset_trans(Eina_Unicode g, Termstate *state);
#endif

@ -196,8 +196,8 @@ _termpty_text_append(Termpty *ty, const Eina_Unicode *codepoints, int len)
termpty_cell_copy(ty, &(cells[j - 1]), &(cells[j]), 1);
}
g = _termpty_charset_trans(codepoints[i], ty->state.charsetch);
g = _termpty_charset_trans(codepoints[i], &ty->state);
termpty_cell_codepoint_att_fill(ty, g, ty->state.att,
&(cells[ty->state.cx]), 1);
#if defined(SUPPORT_DBLWIDTH)
@ -360,6 +360,7 @@ _termpty_reset_att(Termatt *att)
att->autowrapped = 0;
att->newline = 0;
att->tab = 0;
att->fraktur = 0;
}
void

Loading…
Cancel
Save