This commit is contained in:
TrèsAbhi committed 2024-03-09 22:39:04 -06:00
1 parent 6ee1fa13d3
commit ce5a53d0ff
5 files changed
+26 -29

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
import satori from 'satori';
const fonts = [
{
data: require('./Roboto.ttf'),
weight: 400 as const,
name: 'Roboto',
},
{
data: require('./Roboto-Bold.ttf'),
weight: 700 as const,
name: 'Roboto-Bold',
},
{
data: require('./Roboto-Black.ttf'),
weight: 900 as const,
name: 'Roboto-Black',
},
];
export default async function jsxToSvg(jsx: JSX.Element) {
return await satori(jsx, {
width: 480,
fonts,
});
}