From 56a1a7613c3e1c97644252bb4756bc5a44075d3b Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Wed, 6 Jul 2022 17:13:47 -0700 Subject: [PATCH 1/6] add powerline semi circle glyphs --- src/browser/renderer/CustomGlyphs.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/browser/renderer/CustomGlyphs.ts b/src/browser/renderer/CustomGlyphs.ts index 360969cb44..299ec776a3 100644 --- a/src/browser/renderer/CustomGlyphs.ts +++ b/src/browser/renderer/CustomGlyphs.ts @@ -353,7 +353,15 @@ export const powerlineDefinitions: { [index: string]: IVectorShape } = { // Left triangle solid '\u{E0B2}': { d: 'M1,0 L0,.5 L1,1', type: VectorType.FILL }, // Left triangle line - '\u{E0B3}': { d: 'M1,0 L0,.5 L1,1', type: VectorType.STROKE, horizontalPadding: 0.5 } + '\u{E0B3}': { d: 'M1,0 L0,.5 L1,1', type: VectorType.STROKE, horizontalPadding: 0.5 }, + // Right semi-circle solid, + '\u{E0B4}': { d: 'M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0', type: VectorType.FILL }, + // Right semi-circle line, + '\u{E0B5}': { d: 'M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0', type: VectorType.STROKE, horizontalPadding: 0.5 }, + // Left semi-circle solid, + '\u{E0B6}': { d: 'M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.FILL }, + // Left semi-circle line, + '\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE, horizontalPadding: 0.5 } }; /** From 83551eaf60df6e3d20208a38ea72a640358abde2 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed, 6 Jul 2022 18:39:31 -0700 Subject: [PATCH 2/6] Remove horizontal padding for semi-circles --- src/browser/renderer/CustomGlyphs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/renderer/CustomGlyphs.ts b/src/browser/renderer/CustomGlyphs.ts index 299ec776a3..6256a8c490 100644 --- a/src/browser/renderer/CustomGlyphs.ts +++ b/src/browser/renderer/CustomGlyphs.ts @@ -357,11 +357,11 @@ export const powerlineDefinitions: { [index: string]: IVectorShape } = { // Right semi-circle solid, '\u{E0B4}': { d: 'M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0', type: VectorType.FILL }, // Right semi-circle line, - '\u{E0B5}': { d: 'M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0', type: VectorType.STROKE, horizontalPadding: 0.5 }, + '\u{E0B5}': { d: 'M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0', type: VectorType.STROKE }, // Left semi-circle solid, '\u{E0B6}': { d: 'M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.FILL }, // Left semi-circle line, - '\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE, horizontalPadding: 0.5 } +'\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE } }; /** From 28108fbe2ae2ebac362c8a29edcd4de9bf311720 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed, 6 Jul 2022 18:41:47 -0700 Subject: [PATCH 3/6] Add semi-circles to demo --- demo/client.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/demo/client.ts b/demo/client.ts index 1c38af0fc5..a317f3a20f 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -611,6 +611,32 @@ function powerlineSymbolTest() { ` 7 \ue0b3 \x1b[7;37;49m\ue0b2\x1b[0m` ); term.writeln(''); + term.writeln( + `\x1b[7m` + + ` inverse \ue0b5 \x1b[0;40m\ue0b4` + + ` 0 \ue0b5 \x1b[30;41m\ue0b4\x1b[39m` + + ` 1 \ue0b5 \x1b[31;42m\ue0b4\x1b[39m` + + ` 2 \ue0b5 \x1b[32;43m\ue0b4\x1b[39m` + + ` 3 \ue0b5 \x1b[33;44m\ue0b4\x1b[39m` + + ` 4 \ue0b5 \x1b[34;45m\ue0b4\x1b[39m` + + ` 5 \ue0b5 \x1b[35;46m\ue0b4\x1b[39m` + + ` 6 \ue0b5 \x1b[36;47m\ue0b4\x1b[39m` + + ` 7 \ue0b5 \x1b[37;49m\ue0b4\x1b[0m` + ); + term.writeln(''); + term.writeln( + `\x1b[7m` + + ` inverse \ue0b7 \x1b[0;7;40m\ue0b6\x1b[27m` + + ` 0 \ue0b7 \x1b[7;30;41m\ue0b6\x1b[27;39m` + + ` 1 \ue0b7 \x1b[7;31;42m\ue0b6\x1b[27;39m` + + ` 2 \ue0b7 \x1b[7;32;43m\ue0b6\x1b[27;39m` + + ` 3 \ue0b7 \x1b[7;33;44m\ue0b6\x1b[27;39m` + + ` 4 \ue0b7 \x1b[7;34;45m\ue0b6\x1b[27;39m` + + ` 5 \ue0b7 \x1b[7;35;46m\ue0b6\x1b[27;39m` + + ` 6 \ue0b7 \x1b[7;36;47m\ue0b6\x1b[27;39m` + + ` 7 \ue0b7 \x1b[7;37;49m\ue0b6\x1b[0m` + ); + term.writeln(''); term.writeln('Powerline extra symbols:'); term.writeln(' 0 1 2 3 4 5 6 7 8 9 A B C D E F'); term.writeln(`0xA_ ${s('\ue0a3')}`); From 72eb7e245d6921d6b8e9670e9bf5e192f30c9e62 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Wed, 6 Jul 2022 21:49:38 -0400 Subject: [PATCH 4/6] Update src/browser/renderer/CustomGlyphs.ts --- src/browser/renderer/CustomGlyphs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/renderer/CustomGlyphs.ts b/src/browser/renderer/CustomGlyphs.ts index 6256a8c490..e7309e5fc2 100644 --- a/src/browser/renderer/CustomGlyphs.ts +++ b/src/browser/renderer/CustomGlyphs.ts @@ -361,7 +361,7 @@ export const powerlineDefinitions: { [index: string]: IVectorShape } = { // Left semi-circle solid, '\u{E0B6}': { d: 'M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.FILL }, // Left semi-circle line, -'\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE } + '\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE } }; /** From 17b1eed0d2431088e45082f24e885a6d2d1c33bb Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Wed, 6 Jul 2022 21:50:09 -0400 Subject: [PATCH 5/6] Update src/browser/renderer/CustomGlyphs.ts --- src/browser/renderer/CustomGlyphs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/renderer/CustomGlyphs.ts b/src/browser/renderer/CustomGlyphs.ts index e7309e5fc2..6256a8c490 100644 --- a/src/browser/renderer/CustomGlyphs.ts +++ b/src/browser/renderer/CustomGlyphs.ts @@ -361,7 +361,7 @@ export const powerlineDefinitions: { [index: string]: IVectorShape } = { // Left semi-circle solid, '\u{E0B6}': { d: 'M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.FILL }, // Left semi-circle line, - '\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE } +'\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE } }; /** From 8959d6ae1d493b538fcc6ef3f054808d353e3bdd Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed, 6 Jul 2022 18:52:24 -0700 Subject: [PATCH 6/6] Fix indentation --- src/browser/renderer/CustomGlyphs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/renderer/CustomGlyphs.ts b/src/browser/renderer/CustomGlyphs.ts index 6256a8c490..968a877ded 100644 --- a/src/browser/renderer/CustomGlyphs.ts +++ b/src/browser/renderer/CustomGlyphs.ts @@ -361,7 +361,7 @@ export const powerlineDefinitions: { [index: string]: IVectorShape } = { // Left semi-circle solid, '\u{E0B6}': { d: 'M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.FILL }, // Left semi-circle line, -'\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE } + '\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE } }; /**