MCPcopy Create free account
hub / github.com/adobe/react-spectrum / loadFont

Function loadFont

packages/dev/s2-docs/scripts/generateOGImages.mjs:47–53  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

45}
46
47async function loadFont(url) {
48 let res = await fetch(url);
49 if (!res.ok) {
50 throw new Error(`Failed to fetch font: ${url}`);
51 }
52 return new Uint8Array(await res.arrayBuffer());
53}
54
55const [adobeCleanRegular, adobeCleanBold] = await Promise.all([
56 loadFont(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected