=== Dprime Local Fonts ===
Contributors: dprime
Tags: fonts, google fonts, local fonts, performance, privacy
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Downloads Google Fonts to your server and serves them locally with scanner, catalog, and custom upload tools.

== Description ==

Dprime Local Fonts replaces Google Fonts requests with local font files stored on your own WordPress uploads directory.

You can add fonts in three ways:

* Scan page builder content from Breakdance, Elementor, Bricks, Divi, or the full WordPress database
* Add a font from the included Google Fonts catalog and choose the weights you want
* Upload your own woff2, woff, ttf, or otf files

The plugin downloads font files to wp-content/uploads/dp-local-fonts/, creates a local CSS file, removes matching Google Fonts links from the front end, and adds preload hints for active local fonts.

Version 1.8.0 moves Local Fonts to the stable Dprime release channel. It adds the Dprime product manifest and identity icon, adopts the fluid Dprime admin interface with locally bundled typography and icons, and hardens all remote downloads, scans, uploads, and cleanup operations.

== Installation ==

1. Upload the dprime-local-fonts folder to /wp-content/plugins/
2. Activate Dprime Local Fonts from the Plugins screen
3. Go to Dprime > Local Fonts or Local Fonts in the WordPress sidebar
4. Scan your builder, choose a font from the catalog, or upload custom font files
5. Confirm the font appears under Active local fonts

== Frequently Asked Questions ==

= Does this plugin need Dprime Core? =

Local Fonts works without Dprime Core. Dprime Core is required only for automatic updates delivered through the Dprime catalogue. When Dprime Core is installed, Local Fonts also nests under the Dprime parent menu automatically.

= Why did Google Fonts return HTTP 400 before this update? =

Google Fonts CSS2 can reject a request when a selected family does not support every requested weight or style. This version verifies each fallback response and activates the set only when every requested variant succeeds, so an existing local set is never replaced by a partial result.

= Will my fonts still look the same? =

Yes. A Google Fonts request is removed only when every family, weight, and style in that request is available locally. Requests with partial local coverage remain unchanged.

= What happens if I deactivate the plugin? =

The front end goes back to its normal font loading behavior. Saved font files remain in wp-content/uploads/dp-local-fonts/ until the plugin is deleted or the font data is cleared.

= Can I use this for non Google fonts? =

Yes. Use Upload custom to add woff2, woff, ttf, or otf files for any font family.

== Screenshots ==

1. Main Local Fonts admin screen with source options
2. Page builder scan result with downloadable Google Fonts URLs
3. Google Fonts catalog search with selectable weights
4. Active local fonts table
5. Help tab with usage notes

== Changelog ==

= 1.8.0 =
* Promoted Dprime Local Fonts from beta to stable.
* Added the machine readable Dprime product manifest and unique product icon.
* Updated the Dprime Core registration and update endpoint.
* Rebuilt the admin interface on the full width Dprime design system with accessible source tabs and controls.
* Bundled the open source Geist admin typeface and all interface icons locally.
* Restricted remote requests to approved Google Fonts hosts and capped response sizes, redirects, and fallback requests.
* Added explicit MIME, file count, file size, total size, and binary signature checks to custom font uploads.
* Added staged all-or-nothing activation so failed downloads and replacements preserve the working set.
* Matched Google font removal by family, weight, and style and bounded scan memory usage.
* Hardened local file writes, recursive cleanup, and multisite uninstall behavior.

= 1.7.4 =
* Fixed Google Fonts HTTP 400 download failures caused by unsupported selected weights.
* Added server side retries for individual requested weights.
* Added a base family fallback when weight specific requests fail.
* Declared the GPL-2.0-or-later license for free distribution.
* Clarified that Dprime Core is required only for automatic updates.
* Updated plugin metadata, readme, changelog, admin tabs, and package output for the Dprime plugin rules.

= 1.7.3 =
* Fixed Google Fonts CSS2 URL normalization and family name encoding.

= 1.7.2 =
* Fixed the font search dropdown position in the admin page.
* Replaced the text toggle with a chevron icon.

= 1.7.1 =
* Improved the Google Fonts catalog loading inside the admin script.
* Added drag and drop support for custom font uploads.

= 1.7.0 =
* Added uninstall cleanup for saved plugin options.
* Added a footer with Dprime links.
* Updated the admin page to the Dprime visual pattern.

= 1.6.0 =
* Added a separate Help tab file.
* Improved usage documentation.

= 1.5.7 =
* Restructured the plugin into multiple files.
* Added the canonical Dprime menu pattern.

= 1.5.6 =
* Previous release.

== Upgrade Notice ==

= 1.8.0 =
Recommended stable update. Existing local fonts and settings are preserved while security, compatibility, and Dprime integration are upgraded.
