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':