diff --git a/modules/blox/assets/dist/font/JetBrainsMono.var.ttf b/modules/blox/assets/dist/font/JetBrainsMono.var.ttf new file mode 100755 index 00000000..4c96e798 Binary files /dev/null and b/modules/blox/assets/dist/font/JetBrainsMono.var.ttf differ diff --git a/modules/blox/assets/dist/font/RobotoSlab-VariableFont_wght.ttf b/modules/blox/assets/dist/font/RobotoSlab-VariableFont_wght.ttf deleted file mode 100644 index d78883c1..00000000 Binary files a/modules/blox/assets/dist/font/RobotoSlab-VariableFont_wght.ttf and /dev/null differ diff --git a/modules/blox/layouts/_partials/functions/typography.html b/modules/blox/layouts/_partials/functions/typography.html index 6544a72a..5669730e 100644 --- a/modules/blox/layouts/_partials/functions/typography.html +++ b/modules/blox/layouts/_partials/functions/typography.html @@ -1,13 +1,18 @@ {{/* HugoBlox Theme Engine: Typography Rendering - Resolves font families, emits Google Fonts tags, - and generates CSS custom properties for typography. + Resolves font families, emits @font-face for bundled fonts, + Google Fonts tags for remote fonts, and CSS custom properties. + + Font resolution order (per family): + 1. system-sans / system-serif / system-mono → native OS font stack + 2. Bundled file in assets/dist/font/* → local @font-face + 3. Fallback → Google Fonts CDN Input: Theme config dict from get_theme_config: - - typography: { families, weights, sizes, leading, tracking } + - typography: { families, weights, sizes, leading, tracking, variable } - Output: (Google Fonts) + + {{ end }} + {{ end }} + {{ end }} {{ end }} - {{ $resolve_family = merge $resolve_family (dict $role (dict "css" $css "google" $is_google "name" $name)) }} {{ end }} {{/* Build Google Fonts URL */}}