mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
wee ooo wee oo
This commit is contained in:
1 parent
64f1de37ad
commit
2610697d86
1 file changed
+7
-4
@@ -3,17 +3,17 @@ import satori from 'satori';
|
||||
|
||||
const fonts = [
|
||||
{
|
||||
data: readFileSync(require('./Roboto.ttf')),
|
||||
file: require('./Roboto.ttf') as string,
|
||||
weight: 400 as const,
|
||||
name: 'Roboto',
|
||||
},
|
||||
{
|
||||
data: readFileSync(require('./Roboto-Bold.ttf')),
|
||||
file: require('./Roboto-Bold.ttf') as string,
|
||||
weight: 700 as const,
|
||||
name: 'Roboto-Bold',
|
||||
},
|
||||
{
|
||||
data: readFileSync(require('./Roboto-Black.ttf')),
|
||||
file: require('./Roboto-Black.ttf') as string,
|
||||
weight: 900 as const,
|
||||
name: 'Roboto-Black',
|
||||
},
|
||||
@@ -22,6 +22,9 @@ const fonts = [
|
||||
export default async function jsxToSvg(jsx: JSX.Element) {
|
||||
return await satori(jsx, {
|
||||
width: 480,
|
||||
fonts,
|
||||
fonts: fonts.map(({ file, ...font }) => ({
|
||||
data: readFileSync(`${__dirname}/${file}`),
|
||||
...font,
|
||||
})),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user