From: Ben Pfaff Date: Sat, 28 Jan 2023 18:16:25 +0000 (-0800) Subject: ascii: Improve look of dashed line ends. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=279f6ff7d1eb68e54644ebd6000ee03d783f5b08;p=pspp ascii: Improve look of dashed line ends. Until now, partial ends of horizontal dashed lines were rendered as U+2574 BOX DRAWINGS LIGHT LEFT and U+2576 BOX DRAWINGS LIGHT RIGHT, which are solid lines. This looks funny at the end of a dashed line, especially in some fonts. This commit changes these ends to U+254C BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL, which does extend all the way across the character cell but looks much better. --- diff --git a/src/output/ascii.c b/src/output/ascii.c index 1ce3b0ce15..e654691cd6 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -173,7 +173,7 @@ get_unicode_box (void) { /* r b l t: _ d S D */ .c[_][_][_] = { 0x0020, 0x2575, 0x2575, 0x2551, }, /* ╵╵║ */ - .c[_][_][d] = { 0x2574, 0x256f, 0x256f, 0x255c, }, /* ╴╯╯╜ */ + .c[_][_][d] = { 0x254c, 0x256f, 0x256f, 0x255c, }, /* ╴╯╯╜ */ .c[_][_][S] = { 0x2574, 0x256f, 0x256f, 0x255c, }, /* ╴╯╯╜ */ .c[_][_][D] = { 0x2550, 0x255b, 0x255b, 0x255d, }, /* ═╛╛╝ */ .c[_][S][_] = { 0x2577, 0x2502, 0x2502, 0x2551, }, /* ╷││║ */ @@ -188,7 +188,7 @@ get_unicode_box (void) .c[_][D][d] = { 0x2556, 0x2562, 0x2562, 0x2562, }, /* ╖╢╢╢ */ .c[_][D][S] = { 0x2556, 0x2562, 0x2562, 0x2562, }, /* ╖╢╢╢ */ .c[_][D][D] = { 0x2557, 0x2563, 0x2563, 0x2563, }, /* ╗╣╣╣ */ - .c[d][_][_] = { 0x2576, 0x2570, 0x2570, 0x2559, }, /* ╶╰╰╙ */ + .c[d][_][_] = { 0x254c, 0x2570, 0x2570, 0x2559, }, /* ╶╰╰╙ */ .c[d][_][d] = { 0x254c, 0x2534, 0x2534, 0x2568, }, /* ╌┴┴╨ */ .c[d][_][S] = { 0x2500, 0x2534, 0x2534, 0x2568, }, /* ─┴┴╨ */ .c[d][_][D] = { 0x2550, 0x2567, 0x2567, 0x2569, }, /* ═╧╧╩ */ diff --git a/tests/output/pivot-table.at b/tests/output/pivot-table.at index 9e006eac0a..60bab974f7 100644 --- a/tests/output/pivot-table.at +++ b/tests/output/pivot-table.at @@ -706,21 +706,21 @@ Category Borders 1 ┊ ag1 ┊ ┊ ag1 ┊ ┊ ag1 d c a1┊a2┊a3┊a1┊a2┊a3┊a1┊a2┊a3 dg1 d1 c1 0┊ 1┊ 2┊ 3┊ 4┊ 5┊ 6┊ 7┊ 8 - ╶╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ + ╌╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ cg1 c2 9┊10┊11┊12┊13┊14┊15┊16┊17 - ╶╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ + ╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ c3 18┊19┊20┊21┊22┊23┊24┊25┊26 - ╶╌╌╌╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ + ╌╌╌╌╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ d2 c1 27┊28┊29┊30┊31┊32┊33┊34┊35 - ╶╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ + ╌╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ cg1 c2 36┊37┊38┊39┊40┊41┊42┊43┊44 - ╶╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ + ╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ c3 45┊46┊47┊48┊49┊50┊51┊52┊53 ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ d3 c1 54┊55┊56┊57┊58┊59┊60┊61┊62 - ╶╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ + ╌╌╌╌╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ cg1 c2 63┊64┊65┊66┊67┊68┊69┊70┊71 - ╶╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ + ╌╌╌╌╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌+╌╌ c3 72┊73┊74┊75┊76┊77┊78┊79┊80 Category and Dimension Borders 1 @@ -733,19 +733,19 @@ d c a1│a2┊a3│a1│a2┊a3│a1│a2┊a3 dg1 d1 c1 0│ 1┊ 2│ 3│ 4┊ 5│ 6│ 7┊ 8 ╶─────────┼──┼──┼──┼──┼──┼──┼──┼── cg1 c2 9│10┊11│12│13┊14│15│16┊17 - ╶╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ + ╌╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ c3 18│19┊20│21│22┊23│24│25┊26 ╶────────────┼──┼──┼──┼──┼──┼──┼──┼── d2 c1 27│28┊29│30│31┊32│33│34┊35 ╶─────────┼──┼──┼──┼──┼──┼──┼──┼── cg1 c2 36│37┊38│39│40┊41│42│43┊44 - ╶╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ + ╌╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ c3 45│46┊47│48│49┊50│51│52┊53 ────────────────┼──┼──┼──┼──┼──┼──┼──┼── d3 c1 54│55┊56│57│58┊59│60│61┊62 ╶─────────┼──┼──┼──┼──┼──┼──┼──┼── cg1 c2 63│64┊65│66│67┊68│69│70┊71 - ╶╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ + ╌╌╌╌╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌┼╌╌┼╌╌+╌╌ c3 72│73┊74│75│76┊77│78│79┊80 ]) AT_CHECK([pivot-table-test --table-look $srcdir/output/look.stt pivot.txt --box unicode], [0], [expout]) @@ -797,15 +797,15 @@ d3 │c1 54 55 56 57 58 59 60 61 62 Category Borders 2 b - ╶╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ + ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ bg1 - ╶╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╴ + ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ b1 b2 b3 - ╶╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ + ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ a a a - ╶╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ + ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ag1 ag1 ag1 - ╶╌╌╌╌╌╴ ╶╌╌╌╌╌╴ ╶╌╌╌╌╌ + ╌╌╌╌╌╌╌ ╌╌╌╌╌╌╌ ╌╌╌╌╌╌ d c a1 a2 a3 a1 a2 a3 a1 a2 a3 dg1┊d1┊c1 0 1 2 3 4 5 6 7 8 ┊ ┊cg1┊c2 9 10 11 12 13 14 15 16 17 @@ -819,15 +819,15 @@ d3 ┊c1 54 55 56 57 58 59 60 61 62 Category and Dimension Borders 2 b - ╶╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ + ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ bg1 - ╶╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╴ + ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ b1 b2 b3 ╶────────────────────────── a a a - ╶╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ + ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ag1 ag1 ag1 - ╶╌╌╌╌╌╴ ╶╌╌╌╌╌╴ ╶╌╌╌╌╌ + ╌╌╌╌╌╌╌ ╌╌╌╌╌╌╌ ╌╌╌╌╌╌ d c a1 a2 a3 a1 a2 a3 a1 a2 a3 dg1┊d1│c1 0 1 2 3 4 5 6 7 8 ┊ │cg1┊c2 9 10 11 12 13 14 15 16 17 @@ -864,7 +864,7 @@ AT_DATA([pivot.txt], [[ AT_DATA([expout], [dnl Category and Dimension Borders 3 bg1 │ - ╶╌╌╌╌╌╌╌╌┬╌╌╌╌╌╌╌╌┤ + ╌╌╌╌╌╌╌╌╌┬╌╌╌╌╌╌╌╌┤ b1 │ b2 │ b3 ╶──┬─────┼──┬─────┼──┬───── │ ag1 │ │ ag1 │ │ ag1