#Why Vercel OG Image doesn t render image
1 messages · Page 1 of 1 (latest)
I need help with this too. I am trying to get Roboto all font weights to show up.
const thinFetch = fetch(new URL('@public/fonts/Roboto-Thin.ttf', import.meta.url)).then(
(res) => res.arrayBuffer()
);
const lightFetch = fetch(new URL('@public/fonts/Roboto-Light.ttf', import.meta.url)).then(
(res) => res.arrayBuffer()
);
const regularFetch = fetch(new URL('@public/fonts/Roboto-Regular.ttf', import.meta.url)).then(
(res) => res.arrayBuffer()
);
const mediumFetch = fetch(new URL('@public/fonts/Roboto-Medium.ttf', import.meta.url)).then(
(res) => res.arrayBuffer()
);
const boldFetch = fetch(new URL('@public/fonts/Roboto-Bold.ttf', import.meta.url)).then(
(res) => res.arrayBuffer()
);
const blackFetch = fetch(new URL('@public/fonts/Roboto-Black.ttf', import.meta.url)).then(
(res) => res.arrayBuffer()
);
fonts: [
{
name: 'Roboto',
data: thin,
style: '100',
},
{
name: 'Roboto',
data: light,
style: '300',
},
{
name: 'Roboto',
data: regular,
style: 'normal',
},
{
name: 'Roboto',
data: medium,
style: '600',
},
{
name: 'Roboto',
data: bold,
style: '800',
},
{
name: 'Roboto',
data: black,
style: '900',
},
],
Found the resolution here: https://discord.com/channels/752553802359505017/1029867906135228577