← Files ItalicARCHIVED FILE

ui/fonts.js

456 Bytes · Oct 10, 2026 · 06:12 UTC

↓ Download file

/** Register bundled bytes without a font URL or a wider resource allowlist. */
export function loadItalicFonts(faces, {FontFaceType = FontFace, fontSet = document.fonts} = {}) {
  return Promise.all(faces.map(({family, source, ...descriptors}) => {
    const bytes = Uint8Array.from(atob(source), character => character.charCodeAt(0));
    const face = new FontFaceType(family, bytes, descriptors);
    fontSet.add(face);
    return face.load();
  }));
}

SHA-256: f9faaa06a9473788bda17b2d33762db1537cfd8876fe3d50595f3fd344140917