DigiBlocks includes powerful Google Fonts integration that allows you to use beautiful typography in your blocks while giving you full control over how fonts are loaded on your website. The Google Fonts Settings let you choose between loading fonts from Google’s CDN or downloading them locally to your server.
Understanding Google Fonts in DigiBlocks
DigiBlocks automatically detects when you use Google Fonts in your blocks and handles the font loading for you. You can configure how these fonts are delivered to your visitors through the Google Fonts Settings in the DigiBlocks settings panel.
Font Loading Options
CDN Loading (Default)
- Fonts are loaded directly from Google’s servers
- Faster initial setup with no storage requirements
- Fonts are cached globally by Google’s CDN
- Requires external connection to Google servers
Local Font Hosting
- Fonts are downloaded and stored on your server
- Complete control over font delivery
- Better privacy compliance (GDPR-friendly)
- Eliminates external dependencies
Configuring Google Fonts Settings
Accessing the Settings
- Navigate to your WordPress admin dashboard
- Go to DigiBlocks > Settings
- Scroll down to the Google Fonts Settings section
Enabling Local Font Hosting
To switch to local font hosting:
- Locate the Download Google Fonts Locally toggle
- Click the toggle to enable local font hosting
- Click Save Settings to apply the changes
- DigiBlocks will automatically begin processing fonts used in your blocks
Understanding the Settings Interface
The Google Fonts Settings section includes:
- Toggle Switch: Enable or disable local font hosting
- Setting Description: Explains the current behavior and default option
- Auto-Processing: When enabled, DigiBlocks automatically processes all fonts
How Font Processing Works
Automatic Font Detection
DigiBlocks scans your content to identify Google Fonts usage:
- Analyzes all published posts and pages
- Detects fonts used in DigiBlocks elements
- Identifies font weights and styles required
- Processes only the fonts actually used on your site
Local Font Processing
When local hosting is enabled:
- Font Discovery: DigiBlocks identifies all Google Fonts used across your site
- Font Download: Required font files are downloaded from Google Fonts
- Local Storage: Fonts are stored in your uploads directory
- CSS Generation: Local font CSS files are created
- Asset Integration: Font files are automatically linked in your pages
Asset File Structure
Local fonts are organized in your WordPress uploads directory:
/wp-content/uploads/digiblocks/fonts/
├── font-family-name/
│ ├── font-file-400.woff2
│ ├── font-file-700.woff2
│ └── font-file.css
└── digiblocks-fonts-{post-id}.css
Benefits of Local Font Hosting
Privacy and Compliance
GDPR Compliance
- Eliminates data transfer to Google servers
- Removes need for external font loading consent
- Keeps all font assets under your control
Data Privacy
- No visitor information sent to external servers
- Complete control over font delivery
- Improved privacy for your site visitors
Performance Advantages
Reduced External Requests
- Eliminates round trips to Google’s servers
- Reduces DNS lookups and connection overhead
- Faster font loading for visitors
Optimized Delivery
- Fonts served from your CDN or server
- Better cache control and optimization
- Reduced render-blocking resources
Reliability Benefits
Independence from External Services
- Site functionality not dependent on Google’s servers
- No impact from Google Fonts service outages
- Complete control over font availability
CDN Loading Benefits
Faster Initial Setup
No Storage Requirements
- Fonts don’t consume your server storage
- No processing time for font downloads
- Immediate access to Google’s font library
Global CDN Advantages
Optimized Delivery
- Fonts served from Google’s global CDN
- Automatic optimization for visitor location
- Shared caching across websites
Always Updated
- Access to latest font versions
- Automatic font improvements
- No manual font management required
Switching Between Loading Methods
Changing from CDN to Local
When switching to local font hosting:
- Enable the Download Google Fonts Locally toggle
- Save the settings
- DigiBlocks automatically processes existing fonts
- Monitor the process in your browser’s network tab
- Verify fonts load correctly after processing
Changing from Local to CDN
When switching back to CDN loading:
- Disable the Download Google Fonts Locally toggle
- Save the settings
- Local font files remain but are no longer used
- Fonts will load from Google’s CDN instead
Asset Regeneration
After changing font settings, you may need to regenerate assets:
- Go to DigiBlocks > Settings
- Click Regenerate All Assets
- Wait for the process to complete
- This ensures all font references are updated correctly
Font Management Best Practices
Regular Maintenance
Monitor Font Usage
- Regularly review which fonts are actually used
- Remove unused fonts to optimize performance
- Keep track of font loading times
Update Considerations
- Test font changes in staging environments
- Monitor site performance after font updates
- Keep backups of working font configurations
Performance Optimization
Font Loading Strategy
- Use font-display: swap for better loading experience
- Preload critical fonts when possible
- Minimize the number of font variations used
Storage Management
- Regularly clean up unused font files
- Monitor font storage usage
- Optimize font file formats (prefer WOFF2)
Troubleshooting Font Issues
Fonts Not Loading Locally
If local fonts aren’t working:
- Check File Permissions: Ensure upload directory is writable
- Verify Storage: Confirm fonts downloaded successfully
- Regenerate Assets: Use the regenerate assets feature
- Clear Caches: Clear any caching plugins or CDN caches
CDN Font Loading Issues
If CDN fonts aren’t loading:
- Check Internet Connection: Verify connection to Google servers
- Review Browser Console: Look for font loading errors
- Verify Font Names: Ensure correct Google Font names are used
- Check DNS: Verify DNS resolution for fonts.googleapis.com
Mixed Loading Issues
If experiencing inconsistent font loading:
- Clear Browser Cache: Force refresh to clear cached fonts
- Check Setting Status: Verify current font loading setting
- Regenerate Assets: Process all fonts with current settings
- Review Network Tab: Monitor which fonts are loading from where
Advanced Configuration
Manual Font Processing
For advanced users, fonts can be manually processed:
- Access the font processing functionality through code
- Use WordPress filters to customize font behavior
- Integrate with custom caching solutions
- Implement custom font loading strategies
Integration with Other Plugins
DigiBlocks font settings work with:
- Caching Plugins: Automatically integrates with popular caching solutions
- CDN Services: Compatible with CDN configurations
- Performance Plugins: Works alongside optimization plugins
- Privacy Plugins: Supports privacy-focused configurations
The Google Fonts Settings in DigiBlocks provide you with complete flexibility over how typography is delivered on your website, allowing you to choose the approach that best fits your privacy, performance, and reliability requirements.