Font Access API - Online Browse Local Fonts
Enumerate all fonts installed on your device and see a real‑time preview. Useful for design tools. Permission required.
UD5 Toolkit
Test document.fonts — wait for fonts ready, measure load times & inspect FontFaceSet
document.fonts. Please use a modern browser (Chrome 35+, Firefox 41+, Safari 10+, Edge 79+).
document.fonts
| Family | Weight | Style | Status | Check() |
|---|---|---|---|---|
| Click "Refresh List" or load fonts to populate | ||||
Wait for all fonts ready
Load a specific font
Check if font is loaded
Iterate all fonts
document.fonts — a FontFaceSet object that represents all fonts currently registered on the page. It exposes .ready (a Promise), .load(), .check(), and .forEach() methods, giving developers fine-grained control over font loading behavior.
document.fonts.ready returns a Promise that resolves when all fonts on the page have finished loading (or failed). This includes fonts defined via @font-face in CSS as well as fonts added dynamically via FontFace + document.fonts.add(). If all fonts are already loaded at the time of access, the Promise resolves immediately. This is the most common method to safely trigger rendering after web fonts are available, helping avoid FOIT (Flash of Invisible Text).
document.fonts.load(fontSpec) triggers loading of a specific font (e.g., 'bold 16px "Roboto"') and returns a Promise that resolves when that particular font is ready. document.fonts.ready, on the other hand, waits for all fonts on the entire page. Use .load() when you need to preload a specific font before using it; use .ready as a global "all fonts done" gate.
font-display: swap with the Font Loading API. Set font-display: swap in your @font-face rules so the browser uses a fallback font immediately. Then use document.fonts.ready.then(() => { ... }) to detect when the custom font arrives, and apply a class to re-render or adjust layout if needed. For critical text, you can also use document.fonts.load() early in the page lifecycle to pre-warm specific fonts before they are needed for rendering.
document.fonts) is supported in all modern browsers: Chrome 35+, Firefox 41+, Safari 10+, Edge 79+, and Opera 22+. It is not supported in Internet Explorer. For IE compatibility, you would need a polyfill or fallback approach (e.g., using the Font Face Observer library). You can feature-detect support by checking if (document.fonts && document.fonts.ready) { ... }.
FontFace constructor to create a font programmatically: const ff = new FontFace('MyFont', 'url(/font.woff2)', { weight: '700' });await ff.load() and document.fonts.add(ff) to register it. This is powerful for loading fonts on-demand without needing CSS @font-face declarations. The font becomes available immediately for rendering after being added to document.fonts.
Enumerate all fonts installed on your device and see a real‑time preview. Useful for design tools. Permission required.
Select a local font and see all its metrics: ascent, descent, x‑height, and supported features. Typography deep dive.
Paste a Base64 encoded font string and generate the complete @font‑face CSS rule. Inline small fonts easily.
Paste two strings that look the same and see if they differ after normalization. Debug invisible encoding bugs.
Load a WAV file and see its real-time oscilloscope trace and frequency spectrum. Zoom and pan. Pure frontend.
Calculate antenna element lengths for a given frequency (or vice versa). Supports 1/4 wave, 1/2 wave, dipole. Useful for ham radio. Local only.
Enter target total weight and bar weight to see which plates to put on each side. No more counting errors.
Enter a city name or coordinates and see today's sunrise, sunset, and twilight times. Approximate algorithm. Local.
For any latitude and date, calculate the exact daylight hours. See golden hour. Useful for gardening and travel.
Search by country or currency name to find its symbol and code. Quick static reference for international business.
Compress and decompress text using the browser's native Compression Streams API. See the binary output size.
Toggle image‑rendering: auto, pixelated, crisp‑edges on a scaled image. Essential for pixel art display.
See how grid-auto-flow: row vs column changes item placement. Add and remove items to understand the algorithm. Visual.
Demonstrate how to add custom headers and POST‑like functionality to EventSource using a polyfill. Code and example.
See the difference between clone and slice on inline boxes that break across lines. Useful for multi‑line headings.
Connect a game controller and see every button press, axis movement, and vibration test. Uses the Gamepad API.
Unified input demo: see pressure, tilt, and type from any pointer. Compare pointerType values. Essential for drawing apps.
Toggle scrollbar‑gutter: stable to reserve space for the scrollbar and avoid content jumps. Visual demo with two columns.
Experiment with the Federated Credential Management API. Simulate a sign‑in flow without third‑party cookies. Privacy‑first.
Register a one‑off background sync and see it fire when connectivity returns. Debug service worker sync logic.
Request permission and detect when the user is idle (away from keyboard). See screen lock state. For native‑like apps.
Demonstrate how the Web OTP API automatically reads one‑time codes from SMS (mobile). Simulation with a fake SMS input.
Acquire and release locks across tabs. Prevent race conditions in IndexedDB or localStorage. Visual queue and lock state.
Schedule tasks with user‑visible, user‑blocking, or background priority. See execution order and delays. Modern web perf.
Register a periodic background sync to fetch fresh data even when the tab is closed. Understand the API and limits.
Connect a gamepad and see all button presses and axis movements visually. Check that every input is detected correctly.
Trigger different vibration patterns on mobile devices. Test if your phone supports haptic feedback. Simple demo.
Check notification permission, request it, and send a test notification. Verify icon, body, and tag. Debug web push.
Display your effective connection type (4g, 3g, etc.) and downlink speed using the Navigator API. Adapt your app accordingly.
Check current screen orientation and test the lock API. Useful for mobile web apps. Demo with code.