fix(fonts): bundle Inter bold

This commit is contained in:
Danila Poyarkov 2026-05-13 03:50:35 +03:00
parent ccc2b0a52c
commit 66f562b52f
4 changed files with 7 additions and 0 deletions

Binary file not shown.

View file

@ -25,6 +25,7 @@ const BUNDLED_FONTS: Record<string, string> = {
'Inter|Regular': '/Inter-Regular.ttf',
'Inter|Medium': '/Inter-Medium.ttf',
'Inter|SemiBold': '/Inter-SemiBold.ttf',
'Inter|Bold': '/Inter-Bold.ttf',
'Noto Naskh Arabic|Regular': '/NotoNaskhArabic-Regular.ttf'
}

BIN
public/Inter-Bold.ttf Normal file

Binary file not shown.

View file

@ -496,6 +496,12 @@ describe('fetchBundledFont', () => {
expect(expectDefined(buffer, 'Inter font buffer').byteLength).toBeGreaterThan(100_000)
})
test('loads Inter-Bold.ttf from assets in headless', async () => {
const buffer = await fontManager.fetchBundledFont('/Inter-Bold.ttf')
expect(buffer).toBeInstanceOf(ArrayBuffer)
expect(expectDefined(buffer, 'Inter bold font buffer').byteLength).toBeGreaterThan(100_000)
})
test('returns valid TTF data', async () => {
const buffer = await fontManager.fetchBundledFont('/Inter-Regular.ttf')
const view = new DataView(expectDefined(buffer, 'Inter font buffer'))