Files
afilmory/scripts/file-to-buffer.ts
Innei 9630aa9a85 feat(og): enhance image generation with new font and layout adjustments
- Added SF Pro Display font for improved typography in OG images.
- Increased padding and dimensions for better visual presentation.
- Updated font sizes and margins for titles, descriptions, and tags to enhance readability.
- Adjusted layout properties for image containers and text alignment.

Signed-off-by: Innei <tukon479@gmail.com>

fix(og): update typography and layout for OG images

- Changed letter spacing from 2px to 1px for improved text clarity.
- Updated font family to include Geist for enhanced visual consistency.

Signed-off-by: Innei <tukon479@gmail.com>

feat(og): enhance OG image styling with new background and decorative elements

Signed-off-by: Innei <tukon479@gmail.com>

update og
2025-06-10 16:53:04 +08:00

18 lines
536 B
TypeScript

import { readFileSync, writeFileSync } from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const fileToBuffer = (filePath: string) => {
const buffer = readFileSync(filePath)
const u8Array = new Uint8Array(buffer.buffer)
return u8Array
}
const __dirname = fileURLToPath(new URL('.', import.meta.url))
writeFileSync(
path.resolve(__dirname, 'SF-Pro-Display-Regular.ttf'),
`export default Buffer.from([${Array.from(fileToBuffer(path.resolve(__dirname, 'SF-Pro-Display-Regular.ttf')))}]);`,
)