import { settings } from '../../../../settings/settings.mjs';

async function loadFontAsBase64(url) {
  const response = await settings.ADAPTER.fetch(url);
  const blob = await response.blob();
  const reader = new FileReader();
  const dataSrc = await new Promise((resolve, reject) => {
    reader.onloadend = () => resolve(reader.result);
    reader.onerror = reject;
    reader.readAsDataURL(blob);
  });
  return dataSrc;
}

export { loadFontAsBase64 };
//# sourceMappingURL=loadFontAsBase64.mjs.map
