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: <link rel="preload" href="..." as="font">
* 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
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.
SafeFonts supports WOFF2, WOFF, TTF, and OTF font files. We recommend WOFF2 for the best compression and performance.
Is this GDPR compliant?
Yes! SafeFonts stores all fonts locally on your server, so no data is sent to external services like Google Fonts. This makes it GDPR compliant.
Does this work with Gutenberg?
Absolutely! Uploaded fonts automatically appear in:
* All block typography settings
* Paragraph and heading blocks
* Any block with font family support
* WordPress 6.5+ Font Library (if available)
Can I use this with page builders?
The free version works with Gutenberg and provides CSS variables that can be manually used with any builder or theme supporting CSS custom properties (like Builderius, Bricks, Oxygen, and others). Simply use var(–safefonts-font-slug) in typography fields or custom CSS.
For automatic integration (14 integrations including Elementor, Bricks, Beaver Builder, Divi, Oxygen, Brizy, Builderius, Astra, GeneratePress, Kadence, Blocksy, Kadence Blocks, Spectra, and GenerateBlocks) where fonts appear directly in builder dropdowns, check out SafeFonts Pro.
No! SafeFonts uses a custom database table (not WordPress post meta) for optimized fast queries. Fonts are served as static CSS files with no JavaScript overhead.
Can I upload Google Fonts?
Yes! Download the font files from Google Fonts, then upload them individually through SafeFonts. For bulk imports from our Google Fonts Downloader tool, check out SafeFonts Pro.
What’s the difference between SafeFonts Free and Pro?
SafeFonts Free includes:
* Individual font file uploads
* Gutenberg integration
* CSS variables for custom CSS usage
* CSS Reference page with documentation
* Security validation
* WordPress 6.5+ Font Library support
SafeFonts Pro adds:
* Page builder & theme integration (14 integrations: Elementor, Bricks, Beaver Builder, Divi, Oxygen, Brizy, Builderius, Astra, GeneratePress, Kadence, Blocksy, Kadence Blocks, Spectra, GenerateBlocks)
* Bulk ZIP package imports from Google Fonts Downloader
* Enhanced admin interface with bulk operations
* Advanced font management tools (family deletion, CSS variables, etc.)
Font files are stored in /wp-content/uploads/safefonts/ organized by font family (e.g., /roboto/, /open-sans/) with proper security protection. Font metadata is stored in a custom database table for fast retrieval.
Can I delete fonts?
Yes! Each font has a delete button in the SafeFonts admin interface. Deleting a font removes both the file and database entry.