terminology supports fraktur!!
This commit is contained in:
parent
3d137aa3e9
commit
02856cbdec
|
@ -69,6 +69,7 @@ struct _Termatt
|
||||||
unsigned short autowrapped : 1;
|
unsigned short autowrapped : 1;
|
||||||
unsigned short newline : 1;
|
unsigned short newline : 1;
|
||||||
unsigned short tab : 1;
|
unsigned short tab : 1;
|
||||||
|
unsigned short fraktur : 1;
|
||||||
#if defined(SUPPORT_80_132_COLUMNS)
|
#if defined(SUPPORT_80_132_COLUMNS)
|
||||||
unsigned short is_80_132_mode_allowed : 1;
|
unsigned short is_80_132_mode_allowed : 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -162,6 +162,9 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr)
|
||||||
case 9: // strikethrough
|
case 9: // strikethrough
|
||||||
ty->state.att.strike = 1;
|
ty->state.att.strike = 1;
|
||||||
break;
|
break;
|
||||||
|
case 20: // fraktur!
|
||||||
|
ty->state.att.fraktur = 1;
|
||||||
|
break;
|
||||||
case 21: // no bold/bright
|
case 21: // no bold/bright
|
||||||
ty->state.att.bold = 0;
|
ty->state.att.bold = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -169,10 +172,11 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr)
|
||||||
ty->state.att.bold = 0;
|
ty->state.att.bold = 0;
|
||||||
ty->state.att.faint = 0;
|
ty->state.att.faint = 0;
|
||||||
break;
|
break;
|
||||||
case 23: // no italic
|
case 23: // no italic, not fraktur
|
||||||
#if defined(SUPPORT_ITALIC)
|
#if defined(SUPPORT_ITALIC)
|
||||||
ty->state.att.italic = 0;
|
ty->state.att.italic = 0;
|
||||||
#endif
|
#endif
|
||||||
|
ty->state.att.fraktur = 0;
|
||||||
break;
|
break;
|
||||||
case 24: // no underline
|
case 24: // no underline
|
||||||
ty->state.att.underline = 0;
|
ty->state.att.underline = 0;
|
||||||
|
|
|
@ -34,9 +34,9 @@ static const unsigned short vt100_to_unicode[62] =
|
||||||
};
|
};
|
||||||
|
|
||||||
Eina_Unicode
|
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 */
|
case '0': /* DEC Special Character & Line Drawing Set */
|
||||||
if ((g >= 0x41) && (g <= 0x7e) &&
|
if ((g >= 0x41) && (g <= 0x7e) &&
|
||||||
|
@ -49,5 +49,16 @@ _termpty_charset_trans(Eina_Unicode g, int chset)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (state->att.fraktur)
|
||||||
|
{
|
||||||
|
if (g >= 'a' && g <= 'z')
|
||||||
|
{
|
||||||
|
g += 0x1d51e - 'a';
|
||||||
|
}
|
||||||
|
else if (g >= 'A' && g <= 'Z')
|
||||||
|
{
|
||||||
|
g += 0x1d504 - 'A';
|
||||||
|
}
|
||||||
|
}
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef _TERMPTY_GFX_H__
|
#ifndef _TERMPTY_GFX_H__
|
||||||
#define _TERMPTY_GFX_H__ 1
|
#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
|
#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);
|
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,
|
termpty_cell_codepoint_att_fill(ty, g, ty->state.att,
|
||||||
&(cells[ty->state.cx]), 1);
|
&(cells[ty->state.cx]), 1);
|
||||||
#if defined(SUPPORT_DBLWIDTH)
|
#if defined(SUPPORT_DBLWIDTH)
|
||||||
|
@ -360,6 +360,7 @@ _termpty_reset_att(Termatt *att)
|
||||||
att->autowrapped = 0;
|
att->autowrapped = 0;
|
||||||
att->newline = 0;
|
att->newline = 0;
|
||||||
att->tab = 0;
|
att->tab = 0;
|
||||||
|
att->fraktur = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue