[WordPress] 外掛分享: SafeFonts

WordPress 外掛 SafeFonts 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「SafeFonts」是 2025-11-01 上架。
  • 目前有 20 個安裝啟用數。
  • 上一次更新是 2025-12-10,距離現在已有 78 天。
  • 外掛最低要求 WordPress 6.2 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

chrmrtns |

外掛標籤

fonts | gutenberg | typography | custom fonts | google fonts |

內容簡介

```html
<ul>
<li>SafeFonts可以通過本地託管字體並避免第三方請求來協助您符合GDPR要求,並具有無縫的Gutenberg整合。</li>
</ul>
```

1. SafeFonts如何幫助您符合GDPR要求?
- 通過本地託管字體並避免第三方請求。
- 具有無縫的Gutenberg整合。

2. 為什麼選擇SafeFonts?
- 安全第一:對所有字體文件進行Magic byte驗證、MIME類型驗證、文件哈希檢查等安全措施。
- 快速輕巧:自定義數據庫存儲、最大限度減少頁面加載速度等功能。
- Gutenberg整合:與塊編輯器排版自動整合,支援WordPress 6.5+字庫並無需配置。
- 簡單上傳流程:上傳個別字體文件、指定字體族、粗細、樣式等,提供視覺字體預覽工具等功能。
- 性能優化:支持字體預加載、自動預加載標籤生成、用戶可選擇預加載字體、最佳實踐以及減少不可見文本閃爍等特點。
- GDPR合規:本地託管字體、完全數據隱私保護、適用於符合GDPR要求的網站。

3. SafeFonts適合哪些用途?
- 需要符合GDPR要求的重視隱私的網站。
- 需要自定義或高級字體的網站。
- 管理多個客戶網站的機構。
- 希望更好控制印刷排版的人。
- 針對性能優化的網站。
```

原文外掛簡介

SafeFonts helps you comply with GDPR by hosting fonts locally and avoiding third-party requests, with seamless Gutenberg integration and CSS variables support.
If you need to host custom fonts locally on your WordPress site for performance, privacy, or GDPR compliance, SafeFonts makes it simple with advanced security validation, automatic integration with the WordPress block editor, and CSS variables for custom CSS usage.
Compatible With
Block Editors:
* WordPress Gutenberg Block Editor
* WordPress 6.5+ Font Library
* Full Site Editing (FSE) Themes
Need Page Builder Integration?
SafeFonts Pro adds seamless support for 14 integrations: Elementor, Bricks, Beaver Builder, Divi, Oxygen, Brizy, Builderius, Astra, GeneratePress, Kadence, Blocksy, Kadence Blocks, Spectra, and GenerateBlocks with zero configuration.
Why Choose SafeFonts?
🔒 Security-First Approach
* Magic byte validation for all font files
* MIME type verification
* File hash checking
* Configurable file size limits
* Protection against malicious uploads
⚡ Fast & Lightweight
* Custom database storage for instant queries
* Designed to minimize impact on page load speed
* Optimized font delivery
* Works with any theme or page builder
✅ Gutenberg Integration
* Automatic integration with block editor typography
* WordPress 6.5+ Font Library support
* Works with all blocks that support typography
* No configuration needed
🎨 CSS Variables Support
* Automatic CSS variables generation for all fonts
* Use var(–safefonts-font-slug) in custom CSS
* Works with any theme or builder supporting CSS custom properties
* Dedicated CSS Reference page with comprehensive documentation
🎥 Quick Start Video

Watch this quick tutorial to see how easy it is to upload and use custom fonts in WordPress.
🎯 Simple Upload Process
* Individual font file uploads (.woff2, .woff, .ttf, .otf)
* Specify font family, weight, and style
* Visual font previews in admin
* Drag-and-drop ready interface
⚡ Performance Optimization
* Font preloading support for faster page loads
* Automatic preload tag generation: * User-selectable fonts for preloading (Settings tab)
* Best practice: Preload 1-2 critical fonts only
* Reduces flash of invisible text (FOIT)
* Improves Core Web Vitals scores
🌍 GDPR Compliant
* Local font hosting
* No external font requests—fonts are served entirely from your WordPress installation
* Complete data privacy
* Suitable for GDPR-compliant sites
Perfect For

Privacy-conscious websites requiring GDPR compliance
Sites that need custom or premium fonts
Agencies managing multiple client sites
Anyone wanting better control over typography
Performance-optimized websites

How It Works

Upload Fonts: Go to SafeFonts menu and upload your font files
Configure Details: Set font family name, weight (100-900), and style (normal/italic)
Use Everywhere: Your fonts automatically appear in:

Gutenberg block editor typography settings
CSS variables for custom CSS (check CSS Reference page)
WordPress 6.5+ Font Library

That’s It! Fonts are served locally with optimal performance

Getting Google Fonts
Download Google Fonts from these sources:

SafeFonts Web Font Downloader – convenient bulk download tool
Google Fonts GitHub – official repository
Google Webfonts Helper – third-party download tool

Once downloaded, upload the font files (.woff2, .woff, .ttf, .otf) through SafeFonts > Upload tab.
Need more features? SafeFonts Pro offers bulk ZIP imports, page builder integration, and advanced font management. Learn more
Supported Font Formats

WOFF2 (recommended – best compression)
WOFF (broad browser support)
TTF (TrueType fonts)
OTF (OpenType fonts)

WordPress 6.5+ Font Library
If you’re using WordPress 6.5 or higher, SafeFonts automatically integrates with the native Font Library in the Site Editor, giving you a unified font management experience.
Developer Documentation
Template Functions
SafeFonts provides helper functions for developers:
safefonts() - Get the main plugin instance
safefonts()->font_manager->get_fonts() - Get all fonts from database
safefonts()->font_manager->get_fonts_by_family() - Get fonts grouped by family

Hooks & Filters
Filters:
* upload_mimes – SafeFonts adds font MIME types automatically
Database Structure
Table: wp_chrmrtns_safefonts
* id – Font ID
* font_family – Font family name
* family_slug – Sanitized family slug for folder names (v1.1.0+)
* font_style – normal or italic
* font_weight – 100-900
* file_path – Relative path to font file (includes family folder v1.1.0+)
* file_hash – SHA-256 hash for integrity
* file_size – File size in bytes
* mime_type – Validated MIME type
* created_at – Upload timestamp
* updated_at – Last update timestamp
Architecture
SafeFonts uses modern PHP namespaces and PSR-4 autoloading:
* Chrmrtns\SafeFonts\Core – Main plugin class
* Chrmrtns\SafeFonts\FontManager – Font validation and management
* Chrmrtns\SafeFonts\Admin\AdminInterface – Admin UI
Support
For support, feature requests, or bug reports, please visit:
* GitHub
* Website
Privacy Policy
SafeFonts does not collect, store, or transmit any personal data. All font files are stored locally on your WordPress installation. No data is sent to external services.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「SafeFonts」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.1.1 | 1.1.2 | 1.1.3 | 1.1.4 | 1.1.5 | 1.1.6 | 1.1.7 | 1.1.8 | 1.1.9 | 1.2.0 | trunk |

延伸相關外掛(你可能也想知道)

  • Use Any Font | Custom Font Uploader 》通過使用 Use Any Font 外掛,您可以上傳任何自定字體,讓您的網站看起來優雅大方。無需懂 CSS 的知識,即可快速更換字體。或者您可以選擇從我們的 23,871+ ...。
  • Easy Google Fonts 》, 我們的新 WordPress 主題即將完成!想知道何時發布?太棒了!拜訪我們的網站,輸入您的詳細資料,我們會在準備好時立即通知您 🙂, , 在這裡查看外掛展示, ,...。
  • Orphans 》為避免錯誤的斷行位置,此外掛會修正孤行詞的位置並將孤行詞後的空格替換為硬空格。, 孤行詞是一種文字排版錯誤,指的是將短詞獨立地放置在一行的開頭或結尾...。
  • Self-Hosted Google Fonts 》一個輕鬆的方法可以將所有 Google 字型自架託管,以增加隱私或遵循法律要求。, 主題和外掛的作者通常不願提供自架方法,而下載和上傳所需的字型也相當繁重。,...。
  • wp-Typography 》透過以下方式改善您的網頁排版:, , , 斷字功能 — 支援超過 70 種語言, , , 空格控制,包括:, , 保護單詞不能單獨在一行出現, 選取值與單位粘合, 強制...。
  • Seed Fonts 》Seed Fonts 是一個 WordPress 外掛,可以更輕鬆地使用網頁字型 (@font-face 嵌入)。您可以使用以下方式:, , Google Fonts, 捆綁的泰文-英文字型, 您自己的網...。
  • Google Typography 》Google Typography 外掛可以讓你在現有網站上使用任何 Google 字型,而不需要寫任何程式碼。在「外觀 > 字體排版」設定頁面中,只需添加和自定義多種字型,然...。
  • Advanced Custom Fields: Typography Field 》「Advanced Custom Fields」外掛的排版類別欄位,讓你新增不同的文字屬性,例如字型大小、字型家族、字體顏色等。, 支援的子欄位, , 字型大小, 字型家族, 字...。
  • Elegant Custom Fonts 》這個外掛顯示在「設定」->「字體」。, 針對每個 @font-face,您可以指定 .woff 的 URL、權重、樣式以及字體家族名稱。, 適當的 @font-face 規則會儲存在 C...。
  • Automatic NBSP 》支援波蘭和捷克的排版規則, 將連接詞、介詞等移到新行中(孤煙), 支援法文標點符號, 在符號 ! ? ; % « » 前加入不斷行空格 &nbsp;, 運作方式?, 本外掛...。
  • WP-Cufon 》這個外掛讓在 WordPress 博客中實現 Cufon 變得非常簡單。, 你唯一需要做的就是轉換字型檔案,並將它們上傳到外掛的字型目錄中。, 你可以在 WordPress 博客的...。
  • Typecase Web Fonts 》Typecase 讓在 WordPress 中使用網頁字型的體驗變得愉悅。擁有超過 650 種來自 Google Web Fonts 的字型,Typecase 是一個獨特且易於使用的排版外掛,讓您能...。
  • Dehkadeh Fonts 》這個外掛可以幫助您透過 WordPress 的客製化設定,輕鬆設定主題的不同部分使用波斯字體和字型大小。同時您也可以為 WordPress 後台(即 dashboard)設定自訂...。
  • Animated Typed JS Shortcode 》使用 Typed.js 外掛程式,輕鬆地創建一個動畫打字效果。, 只需安裝和啟用 Animated Typed JS Shortcode 外掛程式即可,透過 [typedjs][/typedjs] 短碼,即可...。
  • Black Widgets For Elementor 》Black Widgets 是 Elementor 的免費外掛,讓你能夠建立獨特的元素並自訂你的網站。, 未來我們會加入更多元素與風格,讓你驚喜不斷;現在就加入 Black Widgets...。

文章
Filter
Mastodon