Reading fonts in Settings: Atkinson Hyperlegible, Lexend, Literata, Source Serif, OpenDyslexic (#359)
All under the SIL Open Font License, taken from Fontsource's npm packages with their licences beside them in web/fonts. Atkinson is the Braille Institute's 2025 Next, one variable file. Each is its Latin subset only, 33-118 KB, fetched once a browser chooses it; anything outside Latin falls to the next font of the list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,16 @@ test('a font chosen in Settings is kept in this browser, over any theme\'s own',
|
||||
await page.waitForFunction(() => document.body);
|
||||
expect(await page.evaluate(() => document.documentElement.dataset.font), 'from the first frame').toBe('serif');
|
||||
|
||||
// A reading font comes from ipx, not a font service, and is drawn once it is chosen.
|
||||
await expect(page.locator('#feedlist')).toBeVisible();
|
||||
await page.locator('#prefs').click();
|
||||
await page.locator('#sfont').selectOption('literata');
|
||||
expect(await face()).toMatch(/^Literata/);
|
||||
await expect.poll(() => page.evaluate(() => document.fonts.check('16px Literata'))).toBe(true);
|
||||
for (const f of ['atkinson', 'lexend', 'literata', 'source-serif', 'opendyslexic-400', 'opendyslexic-700'])
|
||||
expect((await page.request.get(`/fonts/${f}.woff2`)).headers()['content-type'], f).toBe('font/woff2');
|
||||
await page.locator('#modal .cardx').click();
|
||||
|
||||
await expect(page.locator('#feedlist')).toBeVisible();
|
||||
await page.locator('#prefs').click();
|
||||
await page.locator('#sfont').selectOption('theme');
|
||||
|
||||
Reference in New Issue
Block a user