mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
locale-util: extend comments on unicode glyph use, and drop mdash (that actually was an ndash)
Let's add the actual unicode names of the glyphs we use. Let's also add in comments what the width expectations of these glyphs are on the console. Also, remove the "mdash" definition. First of all it wasn't used, but what's worse the glyph encoded was actually an "ndash"... Fixes: #14075
This commit is contained in:
parent
a2a64d3ac9
commit
67861acdf3
@ -342,12 +342,11 @@ const char *special_glyph(SpecialGlyph code) {
|
||||
[SPECIAL_GLYPH_TRIANGULAR_BULLET] = ">",
|
||||
[SPECIAL_GLYPH_BLACK_CIRCLE] = "*",
|
||||
[SPECIAL_GLYPH_BULLET] = "*",
|
||||
[SPECIAL_GLYPH_ARROW] = "->",
|
||||
[SPECIAL_GLYPH_MDASH] = "-",
|
||||
[SPECIAL_GLYPH_ELLIPSIS] = "...",
|
||||
[SPECIAL_GLYPH_MU] = "u",
|
||||
[SPECIAL_GLYPH_CHECK_MARK] = "+",
|
||||
[SPECIAL_GLYPH_CROSS_MARK] = "-",
|
||||
[SPECIAL_GLYPH_ARROW] = "->",
|
||||
[SPECIAL_GLYPH_ELLIPSIS] = "...",
|
||||
[SPECIAL_GLYPH_ECSTATIC_SMILEY] = ":-]",
|
||||
[SPECIAL_GLYPH_HAPPY_SMILEY] = ":-}",
|
||||
[SPECIAL_GLYPH_SLIGHTLY_HAPPY_SMILEY] = ":-)",
|
||||
@ -359,26 +358,34 @@ const char *special_glyph(SpecialGlyph code) {
|
||||
|
||||
/* UTF-8 */
|
||||
[true] = {
|
||||
/* The following are multiple glyphs in both ASCII and in UNICODE */
|
||||
[SPECIAL_GLYPH_TREE_VERTICAL] = "\342\224\202 ", /* │ */
|
||||
[SPECIAL_GLYPH_TREE_BRANCH] = "\342\224\234\342\224\200", /* ├─ */
|
||||
[SPECIAL_GLYPH_TREE_RIGHT] = "\342\224\224\342\224\200", /* └─ */
|
||||
[SPECIAL_GLYPH_TREE_SPACE] = " ", /* */
|
||||
|
||||
/* Single glyphs in both cases */
|
||||
[SPECIAL_GLYPH_TRIANGULAR_BULLET] = "\342\200\243", /* ‣ */
|
||||
[SPECIAL_GLYPH_BLACK_CIRCLE] = "\342\227\217", /* ● */
|
||||
[SPECIAL_GLYPH_BULLET] = "\342\200\242", /* • */
|
||||
[SPECIAL_GLYPH_ARROW] = "\342\206\222", /* → */
|
||||
[SPECIAL_GLYPH_MDASH] = "\342\200\223", /* – */
|
||||
[SPECIAL_GLYPH_ELLIPSIS] = "\342\200\246", /* … */
|
||||
[SPECIAL_GLYPH_MU] = "\316\274", /* μ */
|
||||
[SPECIAL_GLYPH_MU] = "\316\274", /* μ (actually called: GREEK SMALL LETTER MU) */
|
||||
[SPECIAL_GLYPH_CHECK_MARK] = "\342\234\223", /* ✓ */
|
||||
[SPECIAL_GLYPH_CROSS_MARK] = "\342\234\227", /* ✗ */
|
||||
[SPECIAL_GLYPH_ECSTATIC_SMILEY] = "\360\237\230\207", /* 😇 */
|
||||
[SPECIAL_GLYPH_HAPPY_SMILEY] = "\360\237\230\200", /* 😀 */
|
||||
[SPECIAL_GLYPH_SLIGHTLY_HAPPY_SMILEY] = "\360\237\231\202", /* 🙂 */
|
||||
[SPECIAL_GLYPH_NEUTRAL_SMILEY] = "\360\237\230\220", /* 😐 */
|
||||
[SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY] = "\360\237\231\201", /* 🙁 */
|
||||
[SPECIAL_GLYPH_UNHAPPY_SMILEY] = "\360\237\230\250", /* 😨 */
|
||||
[SPECIAL_GLYPH_DEPRESSED_SMILEY] = "\360\237\244\242", /* 🤢 */
|
||||
[SPECIAL_GLYPH_CROSS_MARK] = "\342\234\227", /* ✗ (actually called: BALLOT X) */
|
||||
|
||||
/* Single glyph in Unicode, two in ASCII */
|
||||
[SPECIAL_GLYPH_ARROW] = "\342\206\222", /* → (actually called: RIGHTWARDS ARROW) */
|
||||
|
||||
/* Single glyph in Unicode, three in ASCII */
|
||||
[SPECIAL_GLYPH_ELLIPSIS] = "\342\200\246", /* … (actually called: HORIZONTAL ELLIPSIS) */
|
||||
|
||||
/* These smileys are a single glyph in Unicode, and three in ASCII */
|
||||
[SPECIAL_GLYPH_ECSTATIC_SMILEY] = "\360\237\230\207", /* 😇 (actually called: SMILING FACE WITH HALO) */
|
||||
[SPECIAL_GLYPH_HAPPY_SMILEY] = "\360\237\230\200", /* 😀 (actually called: GRINNING FACE) */
|
||||
[SPECIAL_GLYPH_SLIGHTLY_HAPPY_SMILEY] = "\360\237\231\202", /* 🙂 (actually called: SLIGHTLY SMILING FACE) */
|
||||
[SPECIAL_GLYPH_NEUTRAL_SMILEY] = "\360\237\230\220", /* 😐 (actually called: NEUTRAL FACE) */
|
||||
[SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY] = "\360\237\231\201", /* 🙁 (actually called: SLIGHTLY FROWNING FACE) */
|
||||
[SPECIAL_GLYPH_UNHAPPY_SMILEY] = "\360\237\230\250", /* 😨 (actually called: FEARFUL FACE) */
|
||||
[SPECIAL_GLYPH_DEPRESSED_SMILEY] = "\360\237\244\242", /* 🤢 (actually called: NAUSEATED FACE) */
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -46,12 +46,11 @@ typedef enum {
|
||||
SPECIAL_GLYPH_TRIANGULAR_BULLET,
|
||||
SPECIAL_GLYPH_BLACK_CIRCLE,
|
||||
SPECIAL_GLYPH_BULLET,
|
||||
SPECIAL_GLYPH_ARROW,
|
||||
SPECIAL_GLYPH_MDASH,
|
||||
SPECIAL_GLYPH_ELLIPSIS,
|
||||
SPECIAL_GLYPH_MU,
|
||||
SPECIAL_GLYPH_CHECK_MARK,
|
||||
SPECIAL_GLYPH_CROSS_MARK,
|
||||
SPECIAL_GLYPH_ARROW,
|
||||
SPECIAL_GLYPH_ELLIPSIS,
|
||||
_SPECIAL_GLYPH_FIRST_SMILEY,
|
||||
SPECIAL_GLYPH_ECSTATIC_SMILEY = _SPECIAL_GLYPH_FIRST_SMILEY,
|
||||
SPECIAL_GLYPH_HAPPY_SMILEY,
|
||||
|
@ -81,7 +81,6 @@ static void dump_special_glyphs(void) {
|
||||
dump_glyph(SPECIAL_GLYPH_BLACK_CIRCLE);
|
||||
dump_glyph(SPECIAL_GLYPH_BULLET);
|
||||
dump_glyph(SPECIAL_GLYPH_ARROW);
|
||||
dump_glyph(SPECIAL_GLYPH_MDASH);
|
||||
dump_glyph(SPECIAL_GLYPH_ELLIPSIS);
|
||||
dump_glyph(SPECIAL_GLYPH_MU);
|
||||
dump_glyph(SPECIAL_GLYPH_CHECK_MARK);
|
||||
|
Loading…
Reference in New Issue
Block a user