Acquire section paragraphs once, reuse proven fitting layouts, and bound retained text with borrowed native-resource lifetimes. Share document text family selection and Arabic/CJK coverage resolution rather than preserving missing glyphs. Validate exact zoom parity with real existing font fixtures.
12 lines
415 B
TypeScript
12 lines
415 B
TypeScript
import type { Page } from '@playwright/test'
|
|
|
|
const FONT_MODULE_RESOURCE_CAPACITY = 4096
|
|
|
|
/** Preserve the loaded font module URL even when the dev module graph exceeds the browser's default buffer. */
|
|
export async function trackFontModuleResources(page: Page): Promise<void> {
|
|
await page.addInitScript(
|
|
(capacity) => performance.setResourceTimingBufferSize(capacity),
|
|
FONT_MODULE_RESOURCE_CAPACITY
|
|
)
|
|
}
|