mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-01 13:10:44 -03:00
otra try
This commit is contained in:
@@ -186,8 +186,9 @@ export const GET: RequestHandler = async ({ params, fetch, request }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fontPath = join(process.cwd(), 'src', 'lib', 'assets', 'fonts', 'Ubuntu-Regular.ttf');
|
const font = await fetch(`${new URL(request.url).origin}/fonts/Ubuntu-Regular.ttf`).then((r) =>
|
||||||
const fontData = readFileSync(fontPath);
|
r.arrayBuffer()
|
||||||
|
);
|
||||||
|
|
||||||
const svg = await satori(element, {
|
const svg = await satori(element, {
|
||||||
width: 600,
|
width: 600,
|
||||||
@@ -195,7 +196,8 @@ export const GET: RequestHandler = async ({ params, fetch, request }) => {
|
|||||||
fonts: [
|
fonts: [
|
||||||
{
|
{
|
||||||
name: 'Inter',
|
name: 'Inter',
|
||||||
data: fontData,
|
|
||||||
|
data: font,
|
||||||
weight: 400,
|
weight: 400,
|
||||||
style: 'normal'
|
style: 'normal'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user