Secure, GDPR-compliant font management for WordPress with seamless Gutenberg integration and CSS variables support.
SafeFonts allows you to self-host custom fonts on your WordPress site for GDPR compliance and better performance. Your fonts automatically integrate with the Gutenberg block editor and WordPress 6.5+ Font Library.
- π GDPR Compliant - 100% local font hosting, no external requests
- β¨ Gutenberg Integration - Fonts automatically appear in block editor typography settings
- π¨ WordPress 6.5+ Font Library - Full integration with the Site Editor
- π― CSS Variables Support - Use
var(--safefonts-font-slug)in custom CSS for manual integration - π CSS Reference Page - Comprehensive documentation for CSS variables and implementation
- π‘οΈ Secure Upload Validation - Magic byte verification, MIME type checking, file hashing
- β‘ Font Preloading - Reduce FOIT (Flash of Invisible Text) for better performance
- π Translation Ready - Full i18n support with POT file included
- π± Responsive Admin Interface - Clean, modern UI with tabbed navigation
- WordPress 6.2 or higher
- PHP 7.4 or higher
- Write permissions for
wp-content/uploads/safefonts/directory
- WOFF2 (recommended) - Best compression and modern browser support
- WOFF - Good fallback for older browsers
- TTF - TrueType fonts, widely compatible
- OTF - OpenType fonts with advanced typography features
- Upload Fonts - Go to SafeFonts β Upload and add your font files
- Configure Details - Set font family name, weight (100-900), and style (normal/italic)
- Use Everywhere - Fonts automatically appear in:
- Gutenberg block editor typography controls
- WordPress 6.5+ Site Editor Font Library
- Global Styles typography settings
- CSS variables for custom CSS usage (check CSS Reference page)
- Go to Plugins > Add New
- Search for "SafeFonts"
- Click Install Now, then Activate
- Go to SafeFonts in the admin menu to start uploading fonts
- Download the plugin zip file
- Go to Plugins > Add New > Upload Plugin
- Choose the zip file and click Install Now
- Click Activate Plugin
- Go to SafeFonts β Upload
- Enter the font family name (e.g., "Open Sans")
- Select the font weight (100-900)
- Choose the font style (Normal or Italic)
- Upload your font file
- Click Upload Font
- Edit any post or page
- Select a block with text (Paragraph, Heading, etc.)
- Open Typography settings in the block sidebar
- Your SafeFonts will appear in the font dropdown
- Go to Appearance β Editor
- Click Styles β Typography
- Your fonts appear in the Font Library
- Click "Manage font library" to see all your SafeFonts
Set the maximum size for font uploads (1-50 MB). Default is 2 MB.
Choose which font formats can be uploaded (WOFF2, WOFF, TTF, OTF).
Enable preloading for 1-2 critical fonts to improve page load performance. Only preload fonts used above the fold.
Choose whether to keep or delete plugin data when uninstalling.
// Get main plugin instance
safefonts();
// Get all fonts from database
safefonts()->font_manager->get_fonts();
// Get fonts grouped by family
safefonts()->font_manager->get_fonts_by_family();Table: wp_chrmrtns_safefonts
id- Font IDfont_family- Font family namefont_style- normal or italicfont_weight- 100-900file_path- Filename only (files in uploads/safefonts/)file_hash- SHA-256 hash for integrityfile_size- File size in bytesmime_type- Validated MIME typecreated_at- Upload timestampupdated_at- Last update timestamp
SafeFonts uses modern PHP namespaces and PSR-4 autoloading:
Chrmrtns\SafeFonts\Core- Main plugin classChrmrtns\SafeFonts\FontManager- Font validation and managementChrmrtns\SafeFonts\Admin\AdminInterface- Admin UI
Want more features? SafeFonts Pro includes:
- β 14 Page Builder & Theme Integrations - Elementor, Bricks, Beaver Builder, Divi, Oxygen, Brizy, Builderius, Astra, GeneratePress, Kadence, Blocksy, Kadence Blocks, Spectra, GenerateBlocks
- β Automatic Font Dropdown Integration - Fonts appear directly in builder typography controls
- β Bulk ZIP Import - Upload entire font families at once
- β Automatic Font Detection - Family, weight, and style auto-detected from filenames
- β Priority Support - Direct help from our team
Upgrade seamlessly - all fonts and settings are preserved!
Yes! SafeFonts hosts all fonts locally on your server at wp-content/uploads/safefonts/, so no data is sent to external services like Google Fonts. This makes it fully GDPR compliant.
WOFF2 is recommended for best compression and modern browser support. You can also upload WOFF as a fallback for older browsers.
There's no limit, but keep in mind that too many fonts can affect site performance. Only upload fonts you actually use.
SafeFonts Free 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 where fonts appear directly in builder dropdowns (14 integrations including Elementor, Bricks, Beaver Builder, Divi, Oxygen, Brizy, and more), upgrade to SafeFonts Pro.
Fonts are stored in wp-content/uploads/safefonts/ directory and registered in the WordPress database. This location survives plugin updates and reinstallation.
- Support Forum: WordPress.org Support
- Bug Reports: GitHub Issues
- Website: safefonts.com
- NEW: CSS variables output for all fonts - enables manual font selection in custom CSS and builders supporting CSS custom properties
- NEW: CSS Reference page - comprehensive documentation for CSS variables, Gutenberg classes, and implementation details
- Fix: Auto-regeneration now works correctly for both single plugin updates and bulk updates
- Fix: CSS regeneration hook now properly detects updates from all update methods
- Fix: Fonts now display correctly in Gutenberg block editor
- NEW: Generate .has-{slug}-font-family CSS classes for Gutenberg typography controls
- NEW: Intelligent font fallback detection (serif, sans-serif, monospace, cursive)
- Fix: Database migration now properly adds family_slug column for users upgrading from v1.0.x
- Improved: Enhanced error handling for font uploads with detailed error messages
- Improved: Better directory writability checks before file operations
- Fixed: Removed manual load_plugin_textdomain() per WordPress.org guidelines
- Improved: Help & Documentation page now uses CSS tabs for better organization
- Improved: Cleaner tabbed interface without long scrolling page
- Added: Translation support with POT file (translatable strings ready)
- Added: Full internationalization (i18n) support for translators
SafeFonts is licensed under the GPL v2 or later.
Chris Martens Website: chris-martens.com Plugin: safefonts.com
Made with β€οΈ for the WordPress community