From 41c645444152148f7e2d9fc19b87d2d5ebb7caf4 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 27 May 2026 16:19:59 +0300 Subject: [PATCH] fix font issue --- bskyogcard/src/components/ChatInvite.tsx | 2 -- bskyogcard/src/context.ts | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bskyogcard/src/components/ChatInvite.tsx b/bskyogcard/src/components/ChatInvite.tsx index 4a64c9a103..feb3b61007 100644 --- a/bskyogcard/src/components/ChatInvite.tsx +++ b/bskyogcard/src/components/ChatInvite.tsx @@ -79,13 +79,11 @@ export function ChatInvite({ minHeight: 130, maxWidth: 1000, wordBreak: 'break-word', - // textWrap: 'balance', lineClamp: 2, textOverflow: 'ellipsis', overflow: 'hidden', }}> {preview.name} - {/*{(preview.name + ' ').repeat(200)}*/} {/* By @handle */} diff --git a/bskyogcard/src/context.ts b/bskyogcard/src/context.ts index fef1d7b8ac..9926b2f056 100644 --- a/bskyogcard/src/context.ts +++ b/bskyogcard/src/context.ts @@ -40,7 +40,7 @@ export class AppContext { const fontFiles = readdirSync(fontDirectory) const fonts = fontFiles.map(file => { return { - name: path.basename(file, path.extname(file)), + name: getName(file), data: readFileSync(path.join(fontDirectory, file)), weight: getWeight(file), } @@ -55,6 +55,12 @@ export class AppContext { } } +function getName(file: string): string { + const base = path.basename(file, path.extname(file)) + if (base.startsWith('Inter-')) return 'Inter' + return base +} + function getWeight(file: string): FontWeight { switch (path.basename(file, path.extname(file))) { case 'Inter-Regular':