mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
fix(cli): use ANSI Shadow figlet font for banner
Replaces the hand-drawn block letters with the figlet ANSI Shadow font which has clean box-drawing characters for proper letter shaping. White-to-blue gradient unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c3f692d5c3
commit
3a47de9f75
@@ -30,38 +30,17 @@ function rgb(r: number, g: number, b: number, text: string): string {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Letter definitions (4 rows each)
|
||||
// Box-drawing block art (figlet "ANSI Shadow" style)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
type Letter = [string, string, string, string];
|
||||
|
||||
const LETTERS: Record<string, Letter> = {
|
||||
H: ["█ █", "████", "█ █", "█ █"],
|
||||
Y: ["█ █", " ██ ", " ██ ", " ██ "],
|
||||
P: ["███ ", "█ █", "███ ", "█ "],
|
||||
E: ["████", "█ ", "███ ", "████"],
|
||||
R: ["███ ", "█ █", "███ ", "█ █ "],
|
||||
F: ["████", "█ ", "███ ", "█ "],
|
||||
A: [" ██ ", "█ █", "████", "█ █"],
|
||||
M: ["█ █", "██ ██", "█ █ █", "█ █"],
|
||||
S: [" ███", "█ ", " ██ ", "███ "],
|
||||
};
|
||||
|
||||
function buildRows(): [string, string, string, string] {
|
||||
const word = "HYPERFRAMES";
|
||||
const rows: [string, string, string, string] = ["", "", "", ""];
|
||||
|
||||
for (let i = 0; i < word.length; i++) {
|
||||
const letter = LETTERS[word[i]!];
|
||||
if (!letter) continue;
|
||||
const gap = i > 0 ? " " : "";
|
||||
for (let r = 0; r < 4; r++) {
|
||||
rows[r] += gap + letter[r];
|
||||
}
|
||||
}
|
||||
|
||||
return rows;
|
||||
}
|
||||
const BANNER = [
|
||||
"\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
|
||||
"\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D",
|
||||
"\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
|
||||
"\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u255A\u2588\u2588\u2554\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551",
|
||||
"\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551",
|
||||
"\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D",
|
||||
];
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Public
|
||||
@@ -70,11 +49,10 @@ function buildRows(): [string, string, string, string] {
|
||||
export function printBanner(): void {
|
||||
if (!isColorSupported || !process.stdout.isTTY) return;
|
||||
|
||||
const rows = buildRows();
|
||||
const maxWidth = Math.max(...rows.map((r) => r.length));
|
||||
const maxWidth = Math.max(...BANNER.map((r) => r.length));
|
||||
|
||||
console.log();
|
||||
for (const row of rows) {
|
||||
for (const row of BANNER) {
|
||||
let line = " ";
|
||||
for (let col = 0; col < row.length; col++) {
|
||||
const ch = row[col];
|
||||
|
||||
Reference in New Issue
Block a user