=== Maple Local Fonts ===
Contributors: mapleopentech
Tags: fonts, google fonts, local fonts, gdpr, typography, privacy
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Import Google Fonts to local storage for GDPR-compliant, privacy-friendly typography. Fonts are served from your server, not Google.

== Description ==

**Maple Local Fonts** allows you to import Google Fonts to your WordPress site's local storage. Once imported, fonts are served directly from your server — Google is never contacted again.

= Why Local Fonts? =

* **GDPR Compliance**: Serving fonts from Google's servers can transfer visitor IP addresses to Google, which may violate GDPR. Local fonts eliminate this concern.
* **Performance**: Local fonts can load faster since they're served from your own server without additional DNS lookups.
* **Privacy**: Your visitors' data stays private — no third-party requests for fonts.
* **Reliability**: Fonts are always available, even if Google's services are blocked or unavailable.

= Features =

* **Simple Import**: Enter a font name, select weights and styles, and click to import.
* **WordPress Integration**: Fonts automatically appear in the Full Site Editor typography settings.
* **Clean Removal**: Uninstalling the plugin removes all imported fonts and files.
* **No Frontend Impact**: Zero JavaScript or CSS added to your frontend — only font files are served.

= How It Works =

1. Enter the Google Fonts name (e.g., "Open Sans")
2. Select the weights (400, 700, etc.) and styles (normal, italic)
3. Click "Download & Install"
4. The plugin downloads the font files and registers them with WordPress
5. Use the fonts in Appearance → Editor → Styles → Typography

= Requirements =

* WordPress 6.5 or higher (required for Font Library API)
* PHP 7.4 or higher

== Installation ==

1. Upload the `maple-local-fonts` folder to `/wp-content/plugins/`
2. Activate the plugin through the Plugins menu
3. Go to Appearance → Local Fonts
4. Import your desired fonts

== Frequently Asked Questions ==

= Does this plugin contact Google after importing a font? =

No. The plugin only contacts Google Fonts once, during the import process. After that, fonts are served entirely from your server.

= Where are the font files stored? =

Font files are stored in `wp-content/fonts/`, which is WordPress's default font directory.

= Can I use these fonts with any theme? =

**Block Themes (FSE):** Imported fonts automatically appear in Appearance → Editor → Styles → Typography.

**Classic Themes:** Fonts are registered but must be applied via custom CSS. After importing, add CSS like this to your theme or Customizer:

`body { font-family: "Open Sans", sans-serif; }`

The plugin will detect your theme type and show appropriate instructions.

= What happens to the fonts if I uninstall the plugin? =

When you delete the plugin, all imported fonts and their files are removed. This ensures a clean uninstall.

= Is this plugin GDPR compliant? =

Yes. After importing, fonts are served from your own server. No visitor data is sent to Google or any third party.

= What font formats are downloaded? =

The plugin downloads WOFF2 format, which is the most efficient and widely supported web font format.

= Can I import fonts that aren't on Google Fonts? =

No, this plugin only supports importing from Google Fonts. For other fonts, you would need to manually upload them.

= I'm using Wordfence/a firewall and imports are failing =

If font imports fail, your firewall may be blocking outbound requests. Whitelist these domains:

* `fonts.googleapis.com` (for font CSS)
* `fonts.gstatic.com` (for font files)

**Wordfence:** Go to Wordfence → Firewall → Blocking and ensure these domains aren't blocked. If using Learning Mode, imports should work and the domains will be automatically learned.

**Other firewalls:** Add the above domains to your outbound request allowlist.

= The plugin says it requires WordPress 6.5 =

WordPress 6.5 introduced the Font Library API that this plugin uses. Earlier versions don't support local font registration. Please update WordPress to use this plugin.

== Compatibility ==

= Tested With =

* **WordPress:** 6.5, 6.6, 6.7
* **WooCommerce:** 8.0+ (HPOS compatible)
* **Wordfence:** 7.10+ (see FAQ for firewall settings)
* **LearnDash:** 4.10+
* **Popular Block Themes:** Twenty Twenty-Four, Twenty Twenty-Five

= Theme Compatibility =

* **Block Themes (FSE):** Full support via Site Editor typography settings
* **Classic Themes:** Supported via custom CSS (instructions shown in admin)

== Privacy ==

= Data Collection =

This plugin does not collect any personal data from your website visitors.

= External Services =

This plugin connects to Google Fonts (fonts.googleapis.com and fonts.gstatic.com) **only during the font import process** in the WordPress admin area. This connection is:

* Initiated only by administrators
* Used only to download font files
* Not repeated after initial download

After import, no external connections are made. Fonts are served entirely from your server.

= Cookies =

This plugin does not set any cookies.

== Screenshots ==

1. The font import interface
2. Installed fonts list with delete option
3. Fonts appearing in the Full Site Editor typography settings

== Changelog ==

= 1.0.0 =
* Initial release
* Import Google Fonts to local storage
* WordPress Font Library integration
* Admin interface for font management
* Clean uninstall functionality

== Upgrade Notice ==

= 1.0.0 =
Initial release of Maple Local Fonts.
