[PATCH 2/2] terminal: add glyphs to character list
David Herrmann
dh.herrmann at googlemail.com
Tue May 29 00:37:02 PDT 2012
This adds the actual glyphs/utf-8 characters to the comments of CS_SPECIAL
(DEC special graphics set). They all work on my system with "Monospace" or
"Bitstream" font. But keep the mnemonics so if the UTF8 characters are not
displayed correctly, the comments are still readable.
I don't know if gcc actually reads data as UTF-8 or if C code actually
allows all UTF8 characters. However, unless it reads as "*/" in ASCII, it
shouldn't matter inside of comments.
Anyway, it compiles fine with gcc-4.7.0/amd64 here.
Signed-off-by: David Herrmann <dh.herrmann at googlemail.com>
---
I just found it convenient to directly see what they correspond to, however, if
this is not wanted for compatibility reasons to non-UTF8 compilers, please drop
the patch. However, it might be nice to have this at least in the mailing-list
archives so one can easily look it up.
Regards
David
clients/terminal.c | 64 ++++++++++++++++++++++++++--------------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/clients/terminal.c b/clients/terminal.c
index a3c806e..43b0dcd 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -176,41 +176,41 @@ struct char_sub CS_US[] = {
{{{0, }}, {{0, }}}
};
static struct char_sub CS_UK[] = {
- {{{'#', 0, }}, {{0xC2, 0xA3, 0, }}},
+ {{{'#', 0, }}, {{0xC2, 0xA3, 0, }}}, /* POUND: £ */
{{{0, }}, {{0, }}}
};
static struct char_sub CS_SPECIAL[] = {
- {{{'`', 0, }}, {{0xE2, 0x99, 0xA6, 0}}}, /* diamond */
- {{{'a', 0, }}, {{0xE2, 0x96, 0x92, 0}}}, /* 50% cell */
- {{{'b', 0, }}, {{0xE2, 0x90, 0x89, 0}}}, /* HT */
- {{{'c', 0, }}, {{0xE2, 0x90, 0x8C, 0}}}, /* FF */
- {{{'d', 0, }}, {{0xE2, 0x90, 0x8D, 0}}}, /* CR */
- {{{'e', 0, }}, {{0xE2, 0x90, 0x8A, 0}}}, /* LF */
- {{{'f', 0, }}, {{0xC2, 0xB0, 0, }}}, /* Degree */
- {{{'g', 0, }}, {{0xC2, 0xB1, 0, }}}, /* Plus/Minus */
- {{{'h', 0, }}, {{0xE2, 0x90, 0xA4, 0}}}, /* NL */
- {{{'i', 0, }}, {{0xE2, 0x90, 0x8B, 0}}}, /* VT */
- {{{'j', 0, }}, {{0xE2, 0x94, 0x98, 0}}}, /* CN_RB */
- {{{'k', 0, }}, {{0xE2, 0x94, 0x90, 0}}}, /* CN_RT */
- {{{'l', 0, }}, {{0xE2, 0x94, 0x8C, 0}}}, /* CN_LT */
- {{{'m', 0, }}, {{0xE2, 0x94, 0x94, 0}}}, /* CN_RB */
- {{{'n', 0, }}, {{0xE2, 0x94, 0xBC, 0}}}, /* CROSS */
- {{{'o', 0, }}, {{0xE2, 0x8E, 0xBA, 0}}}, /* Horiz. Scan Line 1 */
- {{{'p', 0, }}, {{0xE2, 0x8E, 0xBB, 0}}}, /* Horiz. Scan Line 3 */
- {{{'q', 0, }}, {{0xE2, 0x94, 0x80, 0}}}, /* Horiz. Scan Line 5 */
- {{{'r', 0, }}, {{0xE2, 0x8E, 0xBC, 0}}}, /* Horiz. Scan Line 7 */
- {{{'s', 0, }}, {{0xE2, 0x8E, 0xBD, 0}}}, /* Horiz. Scan Line 9 */
- {{{'t', 0, }}, {{0xE2, 0x94, 0x9C, 0}}}, /* TR */
- {{{'u', 0, }}, {{0xE2, 0x94, 0xA4, 0}}}, /* TL */
- {{{'v', 0, }}, {{0xE2, 0x94, 0xB4, 0}}}, /* TU */
- {{{'w', 0, }}, {{0xE2, 0x94, 0xAC, 0}}}, /* TD */
- {{{'x', 0, }}, {{0xE2, 0x94, 0x82, 0}}}, /* V */
- {{{'y', 0, }}, {{0xE2, 0x89, 0xA4, 0}}}, /* LE */
- {{{'z', 0, }}, {{0xE2, 0x89, 0xA5, 0}}}, /* GE */
- {{{'{', 0, }}, {{0xCF, 0x80, 0, }}}, /* PI */
- {{{'|', 0, }}, {{0xE2, 0x89, 0xA0, 0}}}, /* NEQ */
- {{{'}', 0, }}, {{0xC2, 0xA3, 0, }}}, /* POUND */
- {{{'~', 0, }}, {{0xE2, 0x8B, 0x85, 0}}}, /* DOT */
+ {{{'`', 0, }}, {{0xE2, 0x99, 0xA6, 0}}}, /* diamond: ♦ */
+ {{{'a', 0, }}, {{0xE2, 0x96, 0x92, 0}}}, /* 50% cell: ▒ */
+ {{{'b', 0, }}, {{0xE2, 0x90, 0x89, 0}}}, /* HT: ␉ */
+ {{{'c', 0, }}, {{0xE2, 0x90, 0x8C, 0}}}, /* FF: ␌ */
+ {{{'d', 0, }}, {{0xE2, 0x90, 0x8D, 0}}}, /* CR: ␍ */
+ {{{'e', 0, }}, {{0xE2, 0x90, 0x8A, 0}}}, /* LF: ␊ */
+ {{{'f', 0, }}, {{0xC2, 0xB0, 0, }}}, /* Degree: ° */
+ {{{'g', 0, }}, {{0xC2, 0xB1, 0, }}}, /* Plus/Minus: ± */
+ {{{'h', 0, }}, {{0xE2, 0x90, 0xA4, 0}}}, /* NL:  */
+ {{{'i', 0, }}, {{0xE2, 0x90, 0x8B, 0}}}, /* VT: ␋ */
+ {{{'j', 0, }}, {{0xE2, 0x94, 0x98, 0}}}, /* CN_RB: ┘ */
+ {{{'k', 0, }}, {{0xE2, 0x94, 0x90, 0}}}, /* CN_RT: ┐ */
+ {{{'l', 0, }}, {{0xE2, 0x94, 0x8C, 0}}}, /* CN_LT: ┌ */
+ {{{'m', 0, }}, {{0xE2, 0x94, 0x94, 0}}}, /* CN_LB: └ */
+ {{{'n', 0, }}, {{0xE2, 0x94, 0xBC, 0}}}, /* CROSS: ┼ */
+ {{{'o', 0, }}, {{0xE2, 0x8E, 0xBA, 0}}}, /* Horiz. Scan Line 1: ⎺ */
+ {{{'p', 0, }}, {{0xE2, 0x8E, 0xBB, 0}}}, /* Horiz. Scan Line 3: ⎻ */
+ {{{'q', 0, }}, {{0xE2, 0x94, 0x80, 0}}}, /* Horiz. Scan Line 5: ─ */
+ {{{'r', 0, }}, {{0xE2, 0x8E, 0xBC, 0}}}, /* Horiz. Scan Line 7: ⎼ */
+ {{{'s', 0, }}, {{0xE2, 0x8E, 0xBD, 0}}}, /* Horiz. Scan Line 9: ⎽ */
+ {{{'t', 0, }}, {{0xE2, 0x94, 0x9C, 0}}}, /* TR: ├ */
+ {{{'u', 0, }}, {{0xE2, 0x94, 0xA4, 0}}}, /* TL: ┤ */
+ {{{'v', 0, }}, {{0xE2, 0x94, 0xB4, 0}}}, /* TU: ┴ */
+ {{{'w', 0, }}, {{0xE2, 0x94, 0xAC, 0}}}, /* TD: ┬ */
+ {{{'x', 0, }}, {{0xE2, 0x94, 0x82, 0}}}, /* V: │ */
+ {{{'y', 0, }}, {{0xE2, 0x89, 0xA4, 0}}}, /* LE: ≤ */
+ {{{'z', 0, }}, {{0xE2, 0x89, 0xA5, 0}}}, /* GE: ≥ */
+ {{{'{', 0, }}, {{0xCF, 0x80, 0, }}}, /* PI: π */
+ {{{'|', 0, }}, {{0xE2, 0x89, 0xA0, 0}}}, /* NEQ: ≠ */
+ {{{'}', 0, }}, {{0xC2, 0xA3, 0, }}}, /* POUND: £ */
+ {{{'~', 0, }}, {{0xE2, 0x8B, 0x85, 0}}}, /* DOT: ⋅ */
{{{0, }}, {{0, }}}
};
--
1.7.10.2
More information about the wayland-devel
mailing list