fix(fonts): bundle Inter bold
This commit is contained in:
parent
ccc2b0a52c
commit
66f562b52f
BIN
packages/core/assets/Inter-Bold.ttf
Normal file
BIN
packages/core/assets/Inter-Bold.ttf
Normal file
Binary file not shown.
|
|
@ -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
BIN
public/Inter-Bold.ttf
Normal file
Binary file not shown.
|
|
@ -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'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue