Skip to content

Commit ad29c52

Browse files
committed
Font seeder update
1 parent 9ad01e1 commit ad29c52

7 files changed

Lines changed: 385 additions & 69 deletions

File tree

bun.lock

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

database/seeders/FontSeeder.php

Lines changed: 258 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,263 @@ public function run(): void
3030
*/
3131
private static function fonts(): array
3232
{
33-
$registry = json_decode(
34-
file_get_contents(base_path('registry.json')),
35-
true,
36-
512,
37-
JSON_THROW_ON_ERROR
38-
);
39-
40-
$fonts = [];
41-
42-
foreach ($registry['items'] ?? [] as $item) {
43-
if (($item['type'] ?? '') !== 'registry:font') {
44-
continue;
45-
}
46-
47-
$font = $item['font'] ?? [];
48-
49-
$fonts[] = [
50-
'name' => $item['name'],
51-
'title' => $item['title'],
52-
'type' => 'registry:font',
53-
'author' => $item['author'] ?? 'designbycode',
54-
'meta' => $item['meta'] ?? ['category' => 'fonts', 'version' => '1.0.0'],
55-
'registryDependencies' => $item['registryDependencies'] ?? [],
56-
'font_family' => $font['family'] ?? null,
57-
'font_provider' => $font['provider'] ?? 'google',
58-
'font_import' => $font['import'] ?? null,
59-
'font_variable' => $font['variable'] ?? null,
60-
'font_weight' => $font['weight'] ?? [],
61-
'font_subsets' => $font['subsets'] ?? [],
62-
'font_selector' => $font['selector'] ?? null,
63-
'font_dependency' => $font['dependency'] ?? null,
64-
];
65-
}
66-
67-
return $fonts;
33+
return [
34+
[
35+
'name' => 'font-inter',
36+
'title' => 'Inter',
37+
'type' => 'registry:font',
38+
'author' => 'designbycode',
39+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
40+
'registryDependencies' => [],
41+
'font_family' => "'Inter Variable', sans-serif",
42+
'font_provider' => 'google',
43+
'font_import' => 'Inter',
44+
'font_variable' => '--font-inter',
45+
'font_weight' => [],
46+
'font_subsets' => ['latin'],
47+
'font_selector' => null,
48+
'font_dependency' => '@fontsource-variable/inter',
49+
],
50+
[
51+
'name' => 'font-nerko-one',
52+
'title' => 'Nerko One',
53+
'type' => 'registry:font',
54+
'author' => 'designbycode',
55+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
56+
'registryDependencies' => [],
57+
'font_family' => "'Nerko One', cursive",
58+
'font_provider' => 'google',
59+
'font_import' => 'NerkoOne',
60+
'font_variable' => '--font-nerko-one',
61+
'font_weight' => [],
62+
'font_subsets' => ['latin'],
63+
'font_selector' => null,
64+
'font_dependency' => '@fontsource/nerko-one',
65+
],
66+
[
67+
'name' => 'font-great-vibes',
68+
'title' => 'Great Vibes',
69+
'type' => 'registry:font',
70+
'author' => 'designbycode',
71+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
72+
'registryDependencies' => [],
73+
'font_family' => "'Great Vibes', cursive",
74+
'font_provider' => 'google',
75+
'font_import' => 'GreatVibes',
76+
'font_variable' => '--font-great-vibes',
77+
'font_weight' => [],
78+
'font_subsets' => ['latin'],
79+
'font_selector' => null,
80+
'font_dependency' => '@fontsource/great-vibes',
81+
],
82+
[
83+
'name' => 'font-poppins',
84+
'title' => 'Poppins',
85+
'type' => 'registry:font',
86+
'author' => 'designbycode',
87+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
88+
'registryDependencies' => [],
89+
'font_family' => "'Poppins', sans-serif",
90+
'font_provider' => 'google',
91+
'font_import' => 'Poppins',
92+
'font_variable' => '--font-poppins',
93+
'font_weight' => [],
94+
'font_subsets' => ['latin'],
95+
'font_selector' => null,
96+
'font_dependency' => '@fontsource/poppins',
97+
],
98+
[
99+
'name' => 'font-dm-serif-display',
100+
'title' => 'DM Serif Display',
101+
'type' => 'registry:font',
102+
'author' => 'designbycode',
103+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
104+
'registryDependencies' => [],
105+
'font_family' => "'DM Serif Display', serif",
106+
'font_provider' => 'google',
107+
'font_import' => 'DMSerifDisplay',
108+
'font_variable' => '--font-dm-serif-display',
109+
'font_weight' => [],
110+
'font_subsets' => ['latin'],
111+
'font_selector' => null,
112+
'font_dependency' => '@fontsource/dm-serif-display',
113+
],
114+
[
115+
'name' => 'font-fira-mono',
116+
'title' => 'Fira Mono',
117+
'type' => 'registry:font',
118+
'author' => 'designbycode',
119+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
120+
'registryDependencies' => [],
121+
'font_family' => "'Fira Mono', monospace",
122+
'font_provider' => 'google',
123+
'font_import' => 'FiraMono',
124+
'font_variable' => '--font-fira-mono',
125+
'font_weight' => [],
126+
'font_subsets' => ['latin'],
127+
'font_selector' => null,
128+
'font_dependency' => '@fontsource/fira-mono',
129+
],
130+
[
131+
'name' => 'font-bebas-neue',
132+
'title' => 'Bebas Neue',
133+
'type' => 'registry:font',
134+
'author' => 'designbycode',
135+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
136+
'registryDependencies' => [],
137+
'font_family' => "'Bebas Neue', sans-serif",
138+
'font_provider' => 'google',
139+
'font_import' => 'BebasNeue',
140+
'font_variable' => '--font-bebas-neue',
141+
'font_weight' => [],
142+
'font_subsets' => ['latin'],
143+
'font_selector' => null,
144+
'font_dependency' => '@fontsource/bebas-neue',
145+
],
146+
[
147+
'name' => 'font-playfair-display',
148+
'title' => 'Playfair Display',
149+
'type' => 'registry:font',
150+
'author' => 'designbycode',
151+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
152+
'registryDependencies' => [],
153+
'font_family' => "'Playfair Display Variable', sans-serif",
154+
'font_provider' => 'google',
155+
'font_import' => 'PlayfairDisplay',
156+
'font_variable' => '--font-playfair-display-serif',
157+
'font_weight' => [],
158+
'font_subsets' => ['latin'],
159+
'font_selector' => null,
160+
'font_dependency' => '@fontsource-variable/playfair-display',
161+
],
162+
[
163+
'name' => 'font-caveat',
164+
'title' => 'Caveat',
165+
'type' => 'registry:font',
166+
'author' => 'designbycode',
167+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
168+
'registryDependencies' => [],
169+
'font_family' => "'Caveat Variable', cursive",
170+
'font_provider' => 'google',
171+
'font_import' => 'Caveat',
172+
'font_variable' => '--font-caveat',
173+
'font_weight' => [],
174+
'font_subsets' => ['latin'],
175+
'font_selector' => null,
176+
'font_dependency' => '@fontsource-variable/caveat',
177+
],
178+
[
179+
'name' => 'font-pixelify-sans',
180+
'title' => 'Pixelify Sans',
181+
'type' => 'registry:font',
182+
'author' => 'designbycode',
183+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
184+
'registryDependencies' => [],
185+
'font_family' => "'Pixelify Sans Variable', system-ui",
186+
'font_provider' => 'google',
187+
'font_import' => 'Pixelify Sans',
188+
'font_variable' => '--font-pixelify-sans',
189+
'font_weight' => [],
190+
'font_subsets' => ['latin'],
191+
'font_selector' => null,
192+
'font_dependency' => '@fontsource-variable/pixelify-sans',
193+
],
194+
[
195+
'name' => 'font-orbitron',
196+
'title' => 'Orbitron',
197+
'type' => 'registry:font',
198+
'author' => 'designbycode',
199+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
200+
'registryDependencies' => [],
201+
'font_family' => "'Orbitron', sans-serif",
202+
'font_provider' => 'google',
203+
'font_import' => 'Orbitron',
204+
'font_variable' => '--font-orbitron-serif',
205+
'font_weight' => [],
206+
'font_subsets' => ['latin'],
207+
'font_selector' => null,
208+
'font_dependency' => '@fontsource/orbitron',
209+
],
210+
[
211+
'name' => 'font-ibm-plex-sans',
212+
'title' => 'IBM Plex Sans',
213+
'type' => 'registry:font',
214+
'author' => 'designbycode',
215+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
216+
'registryDependencies' => [],
217+
'font_family' => "'IBM Plex Sans', sans-serif",
218+
'font_provider' => 'google',
219+
'font_import' => 'IBM Plex Sans',
220+
'font_variable' => '--font-ibm-plex-sans',
221+
'font_weight' => [],
222+
'font_subsets' => ['latin'],
223+
'font_selector' => null,
224+
'font_dependency' => '@fontsource/ibm-plex-sans',
225+
],
226+
[
227+
'name' => 'font-ibm-plex-mono',
228+
'title' => 'IBM Plex Mono',
229+
'type' => 'registry:font',
230+
'author' => 'designbycode',
231+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
232+
'registryDependencies' => [],
233+
'font_family' => "'IBM Plex Mono', monospace",
234+
'font_provider' => 'google',
235+
'font_import' => 'IBM Plex Mono',
236+
'font_variable' => '--font-ibm-plex-mono',
237+
'font_weight' => [],
238+
'font_subsets' => ['latin'],
239+
'font_selector' => null,
240+
'font_dependency' => '@fontsource/ibm-plex-mono',
241+
],
242+
[
243+
'name' => 'font-roboto-slab',
244+
'title' => 'Roboto Slab',
245+
'type' => 'registry:font',
246+
'author' => 'designbycode',
247+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
248+
'registryDependencies' => [],
249+
'font_family' => "'Roboto Slab', serif",
250+
'font_provider' => 'google',
251+
'font_import' => 'Roboto Slab',
252+
'font_variable' => '--font-roboto-slab',
253+
'font_weight' => [],
254+
'font_subsets' => ['latin'],
255+
'font_selector' => null,
256+
'font_dependency' => '@fontsource/roboto-slab',
257+
],
258+
[
259+
'name' => 'font-roboto',
260+
'title' => 'Roboto',
261+
'type' => 'registry:font',
262+
'author' => 'designbycode',
263+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
264+
'registryDependencies' => [],
265+
'font_family' => "'Roboto Variable', sans-serif",
266+
'font_provider' => 'google',
267+
'font_import' => 'Roboto Slab',
268+
'font_variable' => '--font-roboto',
269+
'font_weight' => [],
270+
'font_subsets' => ['latin'],
271+
'font_selector' => null,
272+
'font_dependency' => '@fontsource-variable/roboto',
273+
],
274+
[
275+
'name' => 'font-work-sans',
276+
'title' => 'Work Sans',
277+
'type' => 'registry:font',
278+
'author' => 'designbycode',
279+
'meta' => ['category' => 'fonts', 'version' => '1.0.0'],
280+
'registryDependencies' => [],
281+
'font_family' => "'Work Sans Variable', sans-serif",
282+
'font_provider' => 'google',
283+
'font_import' => 'WorkSans',
284+
'font_variable' => '--font-work-sans',
285+
'font_weight' => [],
286+
'font_subsets' => ['latin'],
287+
'font_selector' => null,
288+
'font_dependency' => '@fontsource-variable/work-sans',
289+
],
290+
];
68291
}
69292
}

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,22 @@
3333
},
3434
"dependencies": {
3535
"@base-ui/react": "^1.4.1",
36+
"@fontsource-variable/caveat": "^5.2.8",
37+
"@fontsource-variable/inter": "^5.2.8",
3638
"@fontsource-variable/pixelify-sans": "^5.2.7",
39+
"@fontsource-variable/playfair-display": "^5.2.8",
40+
"@fontsource-variable/roboto": "^5.2.10",
41+
"@fontsource-variable/work-sans": "^5.2.8",
3742
"@fontsource/bebas-neue": "^5.2.7",
43+
"@fontsource/dm-serif-display": "^5.2.8",
44+
"@fontsource/fira-mono": "^5.2.7",
45+
"@fontsource/great-vibes": "^5.2.8",
46+
"@fontsource/ibm-plex-mono": "^5.2.7",
47+
"@fontsource/ibm-plex-sans": "^5.2.8",
48+
"@fontsource/nerko-one": "^5.2.7",
49+
"@fontsource/orbitron": "^5.2.8",
50+
"@fontsource/poppins": "^5.2.7",
51+
"@fontsource/roboto-slab": "^5.2.8",
3852
"@gsap/react": "^2.1.2",
3953
"@headlessui/react": "^2.2.0",
4054
"@inertiajs/react": "^3.0.0",

0 commit comments

Comments
 (0)