mirror of
https://github.com/Afilmory/afilmory
synced 2026-02-01 22:48:17 +00:00
- 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
18 lines
536 B
TypeScript
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')))}]);`,
|
|
)
|