SafeFonts
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.
Top keywords
- font31×4.29%
- fonts20×2.77%
- safefonts20×2.77%
- css11×1.52%
- wordpress11×1.52%
- family9×1.25%
- support9×1.25%
- custom8×1.11%
- file8×1.11%
- upload8×1.11%
- page7×0.97%
- integration6×0.83%
Simple Gutenberg Google Fonts
Simple Google Fonts adds the posibility to change default fonts to Google fonts from within the new WordPress v5.0 editor, codename Gutenberg. You’ll need Gutenberg installed and activated in order to use this plugin. What it does? Simple Google Fonts adds the posibility to change default fonts to Google fonts from within the new WordPress v5.0 editor, codename Gutenberg. You’ll need Gutenberg installed and activated in order to use this plugin. Things to know: Read the After activation section for some info on how to use it. Supported post types: posts and pages You can set Google fonts for individual posts and pages or globally. Globally means that the styles from a selected post will apply to the entire website. It will also apply the styles in the Editor, for new or old posts (that don’t have any styles applied to them). The post needs to be published for you to be able to use its styles globally. If for some reason you change that post to draft mode and the global mode is enabled on it, the option will reset and you’ll need to enable it again after you publish the post. It’s safe to say that if you don’t have an Internet connection, Google fonts will not display (unless you have them installed on your system). To do list: Add support for word-spacing for both body and headings Auto add 700 and 700i weights if the font supports those variants. GDPR Notice By using this plugin (which requests data from Google Fonts servers) you consent that Google will retrieve your IP address and that it might send it to third parties. Also, it’s your responsability to notify and obtain consent from your website’s users (by updating your Privacy Policy and Terms and Conditions). Please read Google’s Privacy Policy and if you agree with it, you can start using this plugin. Theme developers You can use the sgf_defaults filter to change the plugin defaults, example: add_filter( 'sgf_defaults', function( $defaults ) { // since v1.0.1 $check = function_exists( 'sgf_get_font_id' ); // Headings font family $hff = ! $check ? 0 : sgf_get_font_id( 'Josefin Sans' ); // Body font family $bff = ! $check ? 0 : sgf_get_font_id( 'Muli' ); // Headings $defaults[ 'headings' ][ 'ff' ] = $hff; // int | Font Family // Body $defaults[ 'body' ][ 'ff' ] = $bff; // int | Font Family $defaults[ 'body' ][ 'wt' ] = '400'; // string | Font Weight $defaults[ 'body' ][ 'lh' ] = 1.8; // float | Line Height $defaults[ 'body' ][ 'ls' ] = 0; // float | Letter spacing $defaults[ 'body' ][ 'ws' ] = 0; // float | Word spacing // Returns new defaults return $defaults; }, 15 ); For headings you can use the sgf_headings_defaults, example: add_filter( 'sgf_headings_defaults', function( $defaults, $headings ) { // $headings = [ 'h1', ... 'h6' ]; $defaults[ 'h1' ][ 'wt' ] = '400'; // string | H1 font weight, italic is added automatically. $defaults[ 'h1' ][ 'tt' ] = 'none'; // string | H1 text transform $defaults[ 'h1' ][ 'lh' ] = 1.8; // float | Line height $defaults[ 'h1' ][ 'ls' ] = 0; // float | Letter spacing $defaults[ 'h1' ][ 'ws' ] = 0; // float | Words spacing // if a propriety is left out, it will use the plugin default. // you can use this for headings from h1 to h6 return $defaults; }, 10, 2 ); For text logos you can use the sgf_styles_frontend_txt_logo filter to make sure it always takes on the Headings font family, example: add_filter( 'sgf_styles_frontend_txt_logo', function() { return '.logo-wrap'; }, 15 ); You can add these in your functions.php file. If you want to support old PHP versions, replace the anonymous functions with normal functions.