Skip to content

Commit 4ab48d9

Browse files
committed
Adds geist mono font references for the opengraph renderer
1 parent 0051355 commit 4ab48d9

File tree

9 files changed

+35
-5
lines changed

9 files changed

+35
-5
lines changed

app/components/OgImage/Package.vue

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,23 @@ const truncatedVersion = computed(() => {
9494

9595
<h1
9696
class="font-bold tracking-tight leading-none mt-0"
97-
:style="{ fontSize: `${titleFontSize}px`, marginBottom: '-8px' }"
97+
:style="{
98+
fontSize: `${titleFontSize}px`,
99+
marginBottom: '-8px',
100+
fontFamily: 'Geist Mono, monospace',
101+
}"
98102
>
99103
<span class="opacity-80" :style="{ color: props.primaryColor }">./</span>{{ props.name }}
100104
</h1>
101105

102-
<span class="pb-1" :style="{ fontSize: `${versionFontSize}px`, color: props.primaryColor }">
106+
<span
107+
class="pb-1"
108+
:style="{
109+
fontSize: `${versionFontSize}px`,
110+
color: props.primaryColor,
111+
fontFamily: 'Geist Mono, monospace',
112+
}"
113+
>
103114
v{{ truncatedVersion }}
104115
</span>
105116
</div>
@@ -133,7 +144,7 @@ const truncatedVersion = computed(() => {
133144

134145
<h1
135146
class="font-bold tracking-tight leading-none"
136-
:style="{ fontSize: `${titleFontSize}px` }"
147+
:style="{ fontSize: `${titleFontSize}px`, fontFamily: 'Geist Mono, monospace' }"
137148
>
138149
{{ props.name }}
139150
</h1>
@@ -147,11 +158,18 @@ const truncatedVersion = computed(() => {
147158
fontSize: `${versionFontSize}px`,
148159
color: props.primaryColor,
149160
paddingLeft: '22px',
161+
fontFamily: 'Geist Mono, monospace',
150162
}"
151163
>
152164
./
153165
</div>
154-
<span :style="{ fontSize: `${versionFontSize}px`, color: props.primaryColor }">
166+
<span
167+
:style="{
168+
fontSize: `${versionFontSize}px`,
169+
color: props.primaryColor,
170+
fontFamily: 'Geist Mono, monospace',
171+
}"
172+
>
155173
v{{ truncatedVersion }}
156174
</span>
157175
</div>
@@ -198,7 +216,10 @@ const truncatedVersion = computed(() => {
198216
v-if="props.repoOwner && props.repoName"
199217
class="flex flex-row items-center gap-12 text-3xl text-[#737373]"
200218
>
201-
<span class="flex flex-row items-center gap-3">
219+
<span
220+
class="flex flex-row items-center gap-3"
221+
:style="{ fontFamily: 'Geist Mono, monospace' }"
222+
>
202223
<svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor">
203224
<path
204225
d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"

nuxt.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ export default defineNuxtConfig({
178178
defaults: {
179179
component: 'Default',
180180
},
181+
fonts: [
182+
{ name: 'Geist', weight: 400, path: '/fonts/Geist-Regular.ttf' },
183+
{ name: 'Geist', weight: 500, path: '/fonts/Geist-Medium.ttf' },
184+
{ name: 'Geist', weight: 600, path: '/fonts/Geist-SemiBold.ttf' },
185+
{ name: 'Geist', weight: 700, path: '/fonts/Geist-Bold.ttf' },
186+
{ name: 'Geist Mono', weight: 400, path: '/fonts/GeistMono-Regular.ttf' },
187+
{ name: 'Geist Mono', weight: 500, path: '/fonts/GeistMono-Medium.ttf' },
188+
{ name: 'Geist Mono', weight: 700, path: '/fonts/GeistMono-Bold.ttf' },
189+
],
181190
},
182191

183192
pwa: {

public/fonts/Geist-Bold.ttf

70.1 KB
Binary file not shown.

public/fonts/Geist-Medium.ttf

70.4 KB
Binary file not shown.

public/fonts/Geist-Regular.ttf

69.4 KB
Binary file not shown.

public/fonts/Geist-SemiBold.ttf

70.4 KB
Binary file not shown.

public/fonts/GeistMono-Bold.ttf

68.2 KB
Binary file not shown.

public/fonts/GeistMono-Medium.ttf

68.4 KB
Binary file not shown.

public/fonts/GeistMono-Regular.ttf

68.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)