Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions config/native-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,14 @@
'font-xl' => 24,
],

// Geist for people, Geist Mono for the machine. The files are the web app's,
// under the SIL Open Font License (resources/fonts/OFL.txt).
// Geist for people, Geist Mono for the machine, at the weights the web
// loads: Geist 400, 500, 600 and 700, Geist Mono 400 and 500. The files are
// Geist 1.7.2, under the SIL Open Font License (resources/fonts/OFL.txt).
'fonts' => [
'default' => 'Geist-Regular',
'medium' => 'Geist-Medium',
'semibold' => 'Geist-SemiBold',
'bold' => 'Geist-Bold',
'mono' => 'GeistMono-Regular',
'mono-medium' => 'GeistMono-Medium',
],
Expand Down
Binary file added resources/fonts/Geist-Bold.ttf
Binary file not shown.
Binary file added resources/fonts/Geist-Medium.ttf
Binary file not shown.
8 changes: 5 additions & 3 deletions tests/Feature/FontsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ function bundlesFont(string $token): bool
ARRAY_FILTER_USE_KEY,
);

// Never bundled, so these two draw in the system font for now.
unset($unknown['medium'], $unknown['bold']);

expect($unknown)->toBe([]);
});

it('draws medium and bold in Geist at the weights the web loads', function () {
expect(config('native-ui.fonts.medium'))->toBe('Geist-Medium')
->and(config('native-ui.fonts.bold'))->toBe('Geist-Bold');
});
Loading