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

@@ -13,23 +13,20 @@ if (!defined('ABSPATH')) {
/**
* Enqueue typography system
*
* SELF-HOSTED: Fuentes Poppins ahora se cargan desde Assets/fonts/
* Eliminada dependencia de Google Fonts para:
* - Mejorar rendimiento (sin requests externos)
* - Cumplimiento GDPR (sin tracking de Google)
* - Evitar bloqueo de renderizado
*/
function roi_enqueue_fonts() {
// Google Fonts - Poppins (según documentación INTRODUCCION.md)
wp_enqueue_style(
'google-fonts-poppins',
'https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap',
array(),
null,
'all'
);
// Fonts CSS local
// Fonts CSS local con @font-face para Poppins self-hosted
wp_enqueue_style(
'roi-fonts',
get_template_directory_uri() . '/Assets/css/css-global-fonts.css',
array('google-fonts-poppins'),
'1.0.0',
array(),
'1.1.0', // Bump version: self-hosted fonts
'all'
);
}