Skip to content

Commit 9aa8e79

Browse files
committed
make opengraph images more readable
1 parent 7c98005 commit 9aa8e79

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

app/web_development/og/[key]/opengraph-image.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ export default async function Image(props: IImageProps) {
3434
`https://${process.env.VERCEL_URL}` :
3535
`http://localhost:${process.env.PORT ?? '3000'}`
3636

37-
// Font
38-
const permanentMarkerRegular = await fetch(
39-
new URL('/public/assets/fonts/PermanentMarker-Regular.ttf', import.meta.url)
37+
const antaRegular = await fetch(
38+
new URL('/public/assets/fonts/Anta-Regular.ttf', import.meta.url)
4039
).then(res => res.arrayBuffer())
4140

4241
const imageData = await fetch(
@@ -77,8 +76,8 @@ export default async function Image(props: IImageProps) {
7776
left: '0px',
7877
bottom: '0px',
7978
margin: 0,
80-
padding: '0px 27px 27px 27px',
81-
fontFamily: 'PermanentMarkerRegular',
79+
padding: '30px 60px',
80+
fontFamily: 'AntaRegular',
8281
fontWeight: 400,
8382
fontStyle: 'normal',
8483
fontSize: '50',
@@ -98,8 +97,8 @@ export default async function Image(props: IImageProps) {
9897
...size,
9998
fonts: [
10099
{
101-
name: 'PermanentMarkerRegular',
102-
data: permanentMarkerRegular,
100+
name: 'AntaRegular',
101+
data: antaRegular,
103102
style: 'normal',
104103
weight: 400,
105104
},

public/assets/fonts/Anta-Regular.ttf

72 KB
Binary file not shown.

0 commit comments

Comments
 (0)