/** * On-demand Google Fonts loader for admin-only live previews (the pairing * card's "Ag" glyph). Separate from the front-end enqueue in * Aureon\Core\Assets — this only ever loads the specific families visible * in the Font Pairings tab, and never runs outside wp-admin. */ const loaded = new Set< string >(); export function loadGoogleFont( label: string ): void { if ( loaded.has( label ) ) { return; } loaded.add( label ); const link = document.createElement( 'link' ); link.rel = 'stylesheet'; link.href = `https://fonts.googleapis.com/css2?family=${ encodeURIComponent( label ) }:wght@400;600;700&display=swap`; document.head.appendChild( link ); }