add more characters

This commit is contained in:
meganrogge
2021-08-11 15:19:12 -07:00
parent db845a6f24
commit 57c7e6af47
2 changed files with 84 additions and 70 deletions
+78 -69
View File
@@ -232,76 +232,85 @@ export const enum RIGHT {
const MOVE = 'M';
const TO = 'L';
const BOLD = '!';
const THICK = '!';
const yAxis = `${MOVE}${CENTER.TOP} ${TO}${CENTER.BOTTOM}`;
const xAxis = `${MOVE}${LEFT.MIDDLE} ${TO}${RIGHT.MIDDLE}`;
const bottomYAxisFromBottom = `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE}`;
const bottomYAxisFromMiddle = `${MOVE}${CENTER.MIDDLE} ${TO}${CENTER.BOTTOM}`;
const topYAxisFromTop = `${MOVE}${CENTER.TOP} ${TO}${CENTER.MIDDLE}`;
const topYAxisFromMiddle = `${MOVE}${CENTER.TOP} ${TO}${CENTER.MIDDLE}`;
const rightMiddleXAxis = `${MOVE}${CENTER.MIDDLE} ${TO}${RIGHT.MIDDLE}`;
const leftMiddleXAxis = `${MOVE}${CENTER.MIDDLE} ${TO}${LEFT.MIDDLE}`;
export const chars: { [index: string]: string } = {
'━': `${MOVE}${LEFT.MIDDLE} ${TO}${RIGHT.MIDDLE}`,
'│': `${MOVE}${CENTER.TOP} ${TO}${CENTER.BOTTOM}`,
'┃': `${MOVE}${CENTER.TOP} ${TO}${CENTER.BOTTOM}${BOLD}`,
'┌': `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE} ${TO}${RIGHT.MIDDLE}`,
'┍': `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE} ${TO}${RIGHT.MIDDLE}${BOLD}`,
'┎': `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE}${BOLD} ${TO}${RIGHT.MIDDLE}`,
'┏': `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE}${BOLD} ${TO}${RIGHT.MIDDLE}${BOLD}`,
'┐': `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE} ${TO}${LEFT.MIDDLE}`,
'┑': `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE} ${TO}${LEFT.MIDDLE}${BOLD}`,
'┒': `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE}${BOLD} ${TO}${LEFT.MIDDLE}`,
'┓': `${MOVE}${CENTER.BOTTOM} ${TO}${CENTER.MIDDLE}${BOLD} ${TO}${LEFT.MIDDLE}${BOLD}`
// '└': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┕': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┖': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┗': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┘': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┙': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┚': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┛': `${MOVE}${} ${TO}${} ${TO}${}`,
// '├': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┝': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┞': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┟': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┠': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┡': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┢': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┣': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┤': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┥': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┦': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┧': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┨': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┩': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┪': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┫': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┬': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┭': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┮': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┯': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┰': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┱': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┲': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┳': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┴': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┵': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┶': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┷': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┸': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┹': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┺': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┻': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┼': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┽': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┾': `${MOVE}${} ${TO}${} ${TO}${}`,
// '┿': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╀': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╁': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╂': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╃': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╄': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╅': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╆': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╇': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╈': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╉': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╊': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╋': `${MOVE}${} ${TO}${} ${TO}${}`,
'━': `${xAxis}`,
'│': `${yAxis}`,
'┃': `${yAxis}${THICK}`,
'┌': `${bottomYAxisFromBottom} ${TO}${RIGHT.MIDDLE}`,
'┍': `${bottomYAxisFromBottom} ${TO}${RIGHT.MIDDLE}${THICK}`,
'┎': `${bottomYAxisFromBottom}${THICK} ${TO}${RIGHT.MIDDLE}`,
'┏': `${bottomYAxisFromBottom}${THICK} ${TO}${RIGHT.MIDDLE}${THICK}`,
'┐': `${bottomYAxisFromBottom} ${TO}${LEFT.MIDDLE}`,
'┑': `${bottomYAxisFromBottom} ${TO}${LEFT.MIDDLE}${THICK}`,
'┒': `${bottomYAxisFromBottom}${THICK} ${TO}${LEFT.MIDDLE}`,
'┓': `${bottomYAxisFromBottom}${THICK} ${TO}${LEFT.MIDDLE}${THICK}`,
'└': `${topYAxisFromTop} ${TO}${RIGHT.MIDDLE}`,
'┕': `${topYAxisFromTop} ${TO}${RIGHT.MIDDLE}${THICK}`,
'┖': `${topYAxisFromTop}${THICK} ${TO}${RIGHT.MIDDLE}`,
'┗': `${topYAxisFromTop}${THICK} ${TO}${RIGHT.MIDDLE}${THICK}`,
'┘': `${topYAxisFromTop} ${TO}${LEFT.MIDDLE}`,
'┙': `${topYAxisFromTop} ${TO}${LEFT.MIDDLE}${THICK}`,
'┚': `${topYAxisFromTop}${THICK} ${TO}${LEFT.MIDDLE}`,
'┛': `${topYAxisFromTop}${THICK} ${TO}${LEFT.MIDDLE}${THICK}`,
'├': `${yAxis} ${rightMiddleXAxis}`,
'┝': `${yAxis} ${rightMiddleXAxis}${THICK}`,
'┞': `${topYAxisFromTop}${THICK} ${bottomYAxisFromMiddle} ${rightMiddleXAxis}`,
'┟': `${bottomYAxisFromBottom}${THICK} ${topYAxisFromMiddle} ${rightMiddleXAxis}${THICK}`,
'┠': `${yAxis}${THICK} ${rightMiddleXAxis}`,
'┡': `${bottomYAxisFromBottom} ${topYAxisFromMiddle}${THICK} ${rightMiddleXAxis}${THICK}`,
'┢': `${bottomYAxisFromBottom}${THICK} ${topYAxisFromMiddle} ${rightMiddleXAxis}${THICK}`,
'┣': `${yAxis}${THICK} ${rightMiddleXAxis}${THICK}`,
'┤': `${yAxis} ${leftMiddleXAxis}`,
'┥': `${yAxis} ${leftMiddleXAxis}${THICK}`,
'┦': `${topYAxisFromTop}${THICK} ${bottomYAxisFromMiddle} ${leftMiddleXAxis}`,
'┧': `${bottomYAxisFromBottom}${THICK} ${topYAxisFromMiddle} ${leftMiddleXAxis}${THICK}`,
'┨': `${yAxis}${THICK} ${leftMiddleXAxis}`,
'┩': `${bottomYAxisFromBottom} ${topYAxisFromMiddle}${THICK} ${leftMiddleXAxis}${THICK}`,
'┪': `${bottomYAxisFromBottom}${THICK} ${topYAxisFromMiddle} ${leftMiddleXAxis}${THICK}`,
'┫': `${yAxis}${THICK} ${leftMiddleXAxis}${THICK}`,
'┬': `${bottomYAxisFromBottom} ${xAxis}`,
'┭': `${bottomYAxisFromBottom} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}`,
'┮': `${bottomYAxisFromBottom} ${leftMiddleXAxis} ${rightMiddleXAxis}${THICK}`,
'┯': `${bottomYAxisFromBottom} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}${THICK}`,
'┰': `${bottomYAxisFromBottom}${THICK} ${xAxis}`,
'┱': `${bottomYAxisFromBottom}${THICK} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}`,
'┲': `${bottomYAxisFromBottom} ${leftMiddleXAxis} ${rightMiddleXAxis}${THICK}`,
'┳': `${bottomYAxisFromBottom}${THICK} ${xAxis}${THICK}`,
'┴': `${topYAxisFromTop} ${xAxis}`,
'┵': `${topYAxisFromTop} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}`,
'┶': `${topYAxisFromTop} ${leftMiddleXAxis} ${rightMiddleXAxis}${THICK}`,
'┷': `${topYAxisFromTop} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}${THICK}`,
'┸': `${topYAxisFromTop}${THICK} ${xAxis}`,
'┹': `${topYAxisFromTop}${THICK} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}`,
'┺': `${topYAxisFromTop} ${leftMiddleXAxis} ${rightMiddleXAxis}${THICK}`,
'┻': `${topYAxisFromTop}${THICK} ${xAxis}${THICK}`,
'┼': `${yAxis} ${xAxis}`,
'┽': `${yAxis} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}`,
'┾': `${yAxis} ${leftMiddleXAxis} ${rightMiddleXAxis}${THICK}`,
'┿': `${yAxis} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}${THICK}`,
'╀': `${yAxis}${THICK} ${xAxis}`,
'╁': `${yAxis}${THICK} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}`,
'╂': `${yAxis} ${leftMiddleXAxis} ${rightMiddleXAxis}${THICK}`,
'╃': `${yAxis}${THICK} ${xAxis}${THICK}`,
'╄': `${yAxis} ${xAxis}`,
'╅': `${yAxis} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}`,
'╆': `${yAxis} ${leftMiddleXAxis} ${rightMiddleXAxis}${THICK}`,
'╇': `${yAxis} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}${THICK}`,
'╈': `${yAxis}${THICK} ${xAxis}`,
'╉': `${yAxis}${THICK} ${leftMiddleXAxis}${THICK} ${rightMiddleXAxis}`,
'╊': `${yAxis} ${leftMiddleXAxis} ${rightMiddleXAxis}${THICK}`,
'╋': `${yAxis}${THICK} ${xAxis}${THICK}`
// '╌': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╍': `${MOVE}${} ${TO}${} ${TO}${}`,
// '╎': `${MOVE}${} ${TO}${} ${TO}${}`,
@@ -372,7 +381,7 @@ export function draw(ctx: CanvasRenderingContext2D, c: string, xOffset: number,
}
const numX = Number.parseFloat(coords[0].toString()) || Number.parseInt(coords[0].toString());
const numY = Number.parseFloat(coords[1].toString()) || Number.parseInt(coords[1].toString());
if (instruction.endsWith(BOLD)) {
if (instruction.endsWith(THICK)) {
ctx.lineWidth = lineWidth * 2;
} else {
ctx.lineWidth = lineWidth;
+6 -1
View File
@@ -149,7 +149,12 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal {
// this.write('▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇');
this.write('━━│┃\r\n');
this.write(' ━━│┃┌┍┎┏\r\n');
this.write(' ━━│┃┌┐┍┑┎┒┏┓');
this.write(' ━━│┃┌┐┍┑┎┒┏┓\r\n');
this.write(' └┘┕┙┖┚┗┛\r\n');
this.write('├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋╌╍╎╏═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳╴╵╶╷╸╹╺╻╼╽╾╿\r\n');
this.write('├ ┝ ┞ ┟ ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻\r\n');
this.write('┼ ┽ ┾ ┿ ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋\r\n');
this.write('╌ ╍ ╎ ╏ ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟ ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯ ╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿\r\n');
}, 1000);
}