This commit is contained in:
TrèsAbhi committed 2024-03-09 23:33:14 -06:00
1 parent 2610697d86
commit 8c050add23
4 files changed
+6 -8

No files matched your search

@@ -34,7 +34,7 @@ export function WN8SurroundingStat({
style={{
color: theme.colors.textHighContrast,
fontSize: 24,
fontWeight: 'bold',
fontWeight: 700,
}}
>
{value}
@@ -63,7 +63,7 @@ export function RowStat({
<span
style={{
color: theme.textHighContrast,
fontWeight: 'bold',
fontWeight: 700,
fontSize: 16,
textAlign: 'center',
}}
@@ -30,7 +30,7 @@ export default function GenericStatsRow({ stat }: GenericStatsRowProps) {
<span
style={{
color: theme.colors.textHighContrast,
fontWeight: 'bold',
fontWeight: 700,
fontSize: 16,
display: 'flex',
alignItems: 'center',
+3 -5
View File
@@ -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,
})),
});
}