
內容簡介
LocalFonts 外掛自動檢測、下載並從您的伺服器提供 Google 字型,無需手動配置。透過自我託管字型,保護訪客隱私並提升網站性能。
【主要功能】
• 自動檢測並下載 Google 字型
• 無需手動配置,啟用即用
• 保護訪客隱私,無資料傳輸至 Google
• 提升頁面載入速度與性能評分
• 消除對 Google CDN 的依賴
外掛標籤
開發者團隊
原文外掛簡介
LocalFonts automatically detects, downloads, and serves Google Fonts from your own server instead of loading them from Google’s external CDN. No manual configuration needed — just activate and your site’s fonts are instantly self-hosted.
Why Self-Host Google Fonts?
Loading web fonts from Google’s servers (fonts.googleapis.com and fonts.gstatic.com) sends your visitors’ IP addresses to Google with every page load. This raises serious privacy concerns and has legal implications under data protection regulations worldwide.
GDPR & DSGVO Compliance — European courts have ruled that loading Google Fonts from Google’s servers without consent violates GDPR (General Data Protection Regulation) / DSGVO (Datenschutz-Grundverordnung). A German court fined a website operator for transmitting visitor IP addresses to Google via externally loaded fonts. Self-hosting fonts eliminates this risk entirely.
Privacy Protection — When fonts are served locally, zero connections are made to Google’s servers. No visitor IP addresses are transmitted, no tracking occurs, and no third-party requests are made. Your visitors’ data stays on your server.
Faster Page Load Times — Eliminate extra DNS lookups, TCP connections, and TLS handshakes to fonts.googleapis.com and fonts.gstatic.com. Local fonts load from the same server as your site, reducing latency and improving Core Web Vitals metrics including Largest Contentful Paint (LCP), First Contentful Paint (FCP), and Cumulative Layout Shift (CLS).
Better PageSpeed & Performance Scores — Google PageSpeed Insights, GTmetrix, and Lighthouse often flag external font loading as a performance bottleneck. Self-hosting fonts eliminates “Reduce the impact of third-party code” and “Preconnect to required origins” warnings.
Reliability & Uptime — No dependency on Google’s CDN availability. Your fonts work even if Google’s servers are slow, blocked, or unreachable in certain regions or corporate networks.
Simplified Cookie Consent — By eliminating third-party connections to Google, you reduce the scope of your cookie consent and privacy policy requirements, as there are fewer external services to disclose.
What Google Font References Does It Catch?
This plugin intercepts Google Fonts loaded through every common method used by WordPress themes, plugins, and page builders:
Enqueued stylesheets — Fonts registered and enqueued via wp_enqueue_style() using the Google Fonts CSS API v1 (/css?family=) and CSS API v2 (/css2?family=)
Hardcoded tags — Font references hardcoded directly in theme templates, header.php, footer.php, or plugin output
CSS @import url(...) rules — Import statements in inline
