commitshow 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/render.js +6 -5
- package/package.json +1 -1
package/dist/lib/render.js
CHANGED
|
@@ -40,13 +40,14 @@ const BIG_DIGITS = {
|
|
|
40
40
|
' ': [' ', ' ', ' ', ' ', ' '],
|
|
41
41
|
};
|
|
42
42
|
/** Render a string ("68", "100", "82/100") as 5 rows of big ASCII.
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* Block runes ('█▀▄') render wider than ASCII chars in most monospace
|
|
44
|
+
* fonts; what looks like 1 col-width is actually closer to 1.2-1.5×.
|
|
45
|
+
* Earlier 1-space and 2-space gutters left adjacent digits visually
|
|
46
|
+
* fused. We now use a 4-space gutter — wide enough that '0' next to
|
|
47
|
+
* '0' reads as TWO digits rather than one wide blob. */
|
|
47
48
|
function bigText(text) {
|
|
48
49
|
const rows = ['', '', '', '', ''];
|
|
49
|
-
const GAP = '
|
|
50
|
+
const GAP = ' '; // 4-space gutter between glyphs
|
|
50
51
|
for (let i = 0; i < text.length; i++) {
|
|
51
52
|
const ch = text[i];
|
|
52
53
|
const glyph = BIG_DIGITS[ch] ?? BIG_DIGITS[' '];
|