import '@expo/metro-runtime'; import { toPng } from 'html-to-image'; import React, { useEffect } from 'react'; import { renderRootComponent } from 'expo-router/build/renderRootComponent'; import { LoadSkiaWeb } from '@shopify/react-native-skia/lib/module/web'; import CreateApp from './App'; async function inlineGoogleFonts(): Promise { // Find all elements that load Google Fonts CSS const links = Array.from(document.querySelectorAll( 'link[rel="stylesheet"][href*="fonts.googleapis.com"]' )); for (const link of links) { try { const href = link.href; const res = await fetch(href); let cssText = await res.text(); // Ensure font URLs are absolute cssText = cssText.replace(/url\(([^)]+)\)/g, (match, url) => { const clean = url.replace(/["']/g, ""); if (clean.startsWith("http")) { return `url(${clean})`; } return `url(${new URL(clean, href).toString()})`; }); // Inject