mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
my butt
This commit is contained in:
1 parent
2610697d86
commit
8c050add23
4 files changed
+6
-8
No files matched your search
@@ -5,26 +5,24 @@ const fonts = [
|
||||
{
|
||||
file: require('./Roboto.ttf') as string,
|
||||
weight: 400 as const,
|
||||
name: 'Roboto',
|
||||
},
|
||||
{
|
||||
file: require('./Roboto-Bold.ttf') as string,
|
||||
weight: 700 as const,
|
||||
name: 'Roboto-Bold',
|
||||
},
|
||||
{
|
||||
file: require('./Roboto-Black.ttf') as string,
|
||||
weight: 900 as const,
|
||||
name: 'Roboto-Black',
|
||||
},
|
||||
];
|
||||
|
||||
export default async function jsxToSvg(jsx: JSX.Element) {
|
||||
return await satori(jsx, {
|
||||
width: 480,
|
||||
fonts: fonts.map(({ file, ...font }) => ({
|
||||
fonts: fonts.map(({ file, weight }) => ({
|
||||
weight,
|
||||
name: 'Roboto',
|
||||
data: readFileSync(`${__dirname}/${file}`),
|
||||
...font,
|
||||
})),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user