perf(fonts): Self-host Poppins fonts

- Add WOFF2 font files for Poppins (400, 500, 600, 700 weights)
- Create @font-face declarations in css-global-fonts.css
- Remove Google Fonts dependency from enqueue-scripts.php
- Remove preconnect hints for fonts.googleapis.com from seo.php

Benefits:
- Eliminates 36.2 kB external transfer from Google Fonts
- Improves GDPR compliance (no Google tracking)
- Reduces render-blocking requests
- Faster font loading from local server

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
FrankZamora
2025-11-26 22:26:16 -06:00
parent 9d14f38965
commit 8a49b19d00
7 changed files with 25 additions and 49 deletions

View File

@@ -113,19 +113,14 @@ function roi_seo_head_hooks() {
}
/**
* Add prefetch hints for external resources
* ELIMINADO: roi_prefetch_external()
*
* Improves performance by preemptively connecting to external domains
* commonly used in the theme (fonts, CDNs, etc.)
* Motivo: Fuentes Poppins ahora son self-hosted (Assets/fonts/)
* Ya no se necesita preconnect a Google Fonts
*
* @since 1.0.0
* @since 1.0.0 - Creado
* @since 1.1.0 - Eliminado (self-hosted fonts)
*/
function roi_prefetch_external() {
// Google Fonts prefetch
echo '<link rel="preconnect" href="https://fonts.googleapis.com">' . "\n";
echo '<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>' . "\n";
}
add_action('wp_head', 'roi_prefetch_external', 1);
/**
* Open Graph support for Rank Math compatibility