diff --git a/assets/css/css-global-fonts.css b/assets/css/css-global-fonts.css
index c4242db9..a6f9c527 100644
--- a/assets/css/css-global-fonts.css
+++ b/assets/css/css-global-fonts.css
@@ -45,26 +45,22 @@
*/
/* ============================================
- POPPINS (Opcional - Solo si se activa)
+ POPPINS (Self-hosted)
============================================
- Las siguientes declaraciones @font-face solo
- se cargan cuando el usuario activa "Use Custom Fonts"
- en Apariencia > Personalizar > Tipografía.
+ Fuentes Poppins alojadas localmente para:
+ - Eliminar dependencia de Google Fonts
+ - Mejorar rendimiento (sin requests externos)
+ - Cumplimiento GDPR (sin tracking de Google)
- Para activar Poppins:
- 1. Descargar archivos WOFF2 de Google Fonts
- 2. Colocar en assets/fonts/poppins/
- 3. Descomentar las declaraciones @font-face
- 4. Activar en Customizer
+ Pesos incluidos: 400, 500, 600, 700
+ Formato: WOFF2 (mejor compresión)
============================================ */
-/*
@font-face {
font-family: 'Poppins';
- src: url('../fonts/poppins/Poppins-Regular.woff2') format('woff2'),
- url('../fonts/poppins/Poppins-Regular.woff') format('woff');
+ src: url('../fonts/poppins-v24-latin-regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -72,8 +68,7 @@
@font-face {
font-family: 'Poppins';
- src: url('../fonts/poppins/Poppins-Medium.woff2') format('woff2'),
- url('../fonts/poppins/Poppins-Medium.woff') format('woff');
+ src: url('../fonts/poppins-v24-latin-500.woff2') format('woff2');
font-weight: 500;
font-style: normal;
font-display: swap;
@@ -81,8 +76,7 @@
@font-face {
font-family: 'Poppins';
- src: url('../fonts/poppins/Poppins-SemiBold.woff2') format('woff2'),
- url('../fonts/poppins/Poppins-SemiBold.woff') format('woff');
+ src: url('../fonts/poppins-v24-latin-600.woff2') format('woff2');
font-weight: 600;
font-style: normal;
font-display: swap;
@@ -90,21 +84,11 @@
@font-face {
font-family: 'Poppins';
- src: url('../fonts/poppins/Poppins-Bold.woff2') format('woff2'),
- url('../fonts/poppins/Poppins-Bold.woff') format('woff');
+ src: url('../fonts/poppins-v24-latin-700.woff2') format('woff2');
font-weight: 700;
font-style: normal;
font-display: swap;
}
-*/
-
-/* Cuando Poppins esté activo, se aplica con clase .use-custom-fonts */
-/*
-.use-custom-fonts {
- --font-primary: 'Poppins', var(--font-system);
- --font-headings: 'Poppins', var(--font-system);
-}
-*/
/* ============================================
UTILIDADES DE FUENTES
diff --git a/assets/fonts/poppins-v24-latin-500.woff2 b/assets/fonts/poppins-v24-latin-500.woff2
new file mode 100644
index 00000000..c6603368
Binary files /dev/null and b/assets/fonts/poppins-v24-latin-500.woff2 differ
diff --git a/assets/fonts/poppins-v24-latin-600.woff2 b/assets/fonts/poppins-v24-latin-600.woff2
new file mode 100644
index 00000000..921e962b
Binary files /dev/null and b/assets/fonts/poppins-v24-latin-600.woff2 differ
diff --git a/assets/fonts/poppins-v24-latin-700.woff2 b/assets/fonts/poppins-v24-latin-700.woff2
new file mode 100644
index 00000000..bf022fc7
Binary files /dev/null and b/assets/fonts/poppins-v24-latin-700.woff2 differ
diff --git a/assets/fonts/poppins-v24-latin-regular.woff2 b/assets/fonts/poppins-v24-latin-regular.woff2
new file mode 100644
index 00000000..b69e0091
Binary files /dev/null and b/assets/fonts/poppins-v24-latin-regular.woff2 differ
diff --git a/inc/enqueue-scripts.php b/inc/enqueue-scripts.php
index 021f23ba..7e898ad8 100644
--- a/inc/enqueue-scripts.php
+++ b/inc/enqueue-scripts.php
@@ -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'
);
}
diff --git a/inc/seo.php b/inc/seo.php
index 9d3e4f94..3bbc996a 100644
--- a/inc/seo.php
+++ b/inc/seo.php
@@ -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 '' . "\n";
- echo '' . "\n";
-}
-add_action('wp_head', 'roi_prefetch_external', 1);
/**
* Open Graph support for Rank Math compatibility