Cette extension n’a pas été testée avec plus de trois mises à jour majeures de WordPress. Elle peut ne plus être maintenue ou supportée et peut avoir des problèmes de compatibilité lorsqu’elle est utilisée avec des versions de WordPress plus récentes.

Local Google Fonts

Description

Hébergez vos polices Google utilisées sur votre serveur et rendez votre site plus conforme au RGPD 💯.

50 millions de sites environs #042; utilisent Google Fonts et, en janvier 2022, un tribunal allemand a jugé que l’utilisation Google Fonts est une violation du RGPD européen (Règlement Général sur la Protection des Données).

more on wptavern.com.

Captures d’écran

Installation

  1. Téléverser le dossier local-google-fonts dans le répertoire distant /wp-content/plugins/.
  2. Activez l’extension via le menu « Extensions » dans WordPress.
  3. Allez dans Réglages -> Google Fonts et décidez quelles polices doivent être chargées localement.

FAQ

Cela va-t-il charger les Google Fonts automatiquement ?

Oui, en cochant l’option de chargement automatique des polices. Sinon, chaque jeu de polices doit être déclenché manuellement.

Est-ce légal d’auto-héberger les polices Google ?

Oui. Les polices open source de Google Fonts sont publiées sous une licence qui vous permet de les utiliser sur un site, qu’il soit commercial ou personnel.

How to check if my site is loading Google Fonts?

It’s easy to check if your site is loading fonts from a third party source (check 2nd screenshot above):

  1. Open the dev tools (Cmd + Opt + I on Mac or F12, or Ctrl + Shift + I on Windows)
  2. Go to the Network tab and select the Fonts type
  3. Reload your page to see all fonts loaded on your site.
  4. Check the Domain column if it contains domains from a third party (Google is fonts.gstatic.com)

If you host your fonts locally with Local Google Fonts there should be no fonts loaded from the Google servers.

Mes polices n’apparaissent pas sur la page des réglages, que dois-je faire ?

Les polices sont découvertes dès qu’elles sont utilisées. Essayez d’abord de parcourir votre site en ligne et revenez à la page des réglages.

Mes polices ne sont pas remplacées, que dois-je faire ?

L’extension ne vérifie actuellement que les polices intégrées via wp_enqueue_style si vous utilisez les polices Google via @import, vous devez d’abord la modifier.

Le thème Divi charge-t-il toujours une police Google ?

The DIVI theme has a custom implementation of Google Fonts. To use LGF with DIVI disable Improve Google Fonts Loading on the Performance Settings page of DIVI.

Why only the woff2 font format is loaded?

Woff2 is the successor of the woff format and and offers a 30% average compression gain over the original format. It is also supported by over 96% of browsers (source).

How to host Fonts loaded with Slider Revolution?

Slider Revolution uses it’s own way to load Google Fonts and LGF cannot handle them. Slider Revolution has a built in feature for their sliders.

  1. Goto Slider Revolution
  2. Click on « Global » in the top navigation
  3. Find the « Fonts » section and Choose « Cache Fonts Local » on « Enable Google Fonts download »
  4. Save your settings.

Why are some characters displayed in the fallback font?

You may have loaded a subset which doesn’t included required characters. Check additional subsets on the settings page and reload your font.

Avis

12 juillet 2024 1 réponse
Easy Google Fonts with same logo work perfectly. But this plugin useless and unclear why.
26 novembre 2023 1 réponse
I couldn’t find any documentations about what to do first with this plugin. Also I couldn’t find nothing on the Setting page. How do I make it work? Furthermore, it is outdated now.
22 novembre 2023
I was very positively surprised by this plugin. It did – out of the box without any customization – the core tasks which is something other plugins want you to pay for. A client website was made compliant with the GDPR in just 5 minutes and even the client was surprised how easy it all was. Kudos to the developers for the ease of use; this is one impressive piece of software if you ask me. Please keep up the great work. 🙂
Lire les 80 avis

Contributeurs/contributrices & développeurs/développeuses

« Local Google Fonts » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

“Local Google Fonts” a été traduit dans 10 locales. Remerciez l’équipe de traduction pour ses contributions.

Traduisez « Local Google Fonts » dans votre langue.

Le développement vous intéresse ?

Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.

Journal

0.22.0

  • fixed: missing $user_agent variable
  • fixed: missing $tmp_file variable

0.21.0

  • fixed: issue downloading fonts with WordPress 6.2 caused by the download_url method

0.20.0

  • make sure files are loaded via https if requested
  • new filter lgf_folder_urland lgf_folder
  • always append timestamp to prevent caching

0.19

  • please reload fonts manually if you encounter problems after the update
  • completely rewriting the way fonts are loaded which to drop the need for a third party API and support more (deprecated) fonts.
  • better support for multi site (thanks @ravanh)
  • the original style sheet is used for better compatibility
  • added Settings link on the plugins list page
  • added button to manually fetch homepage for used fonts
  • only woff2 fonts are now loaded for better subset support
  • removed unused seed variable

0.18

  • do not use remove_query_arg to strip args as it can break some URLs

0.17

  • remove ver query argument from URLs as they are added by WordPress. Please review settings as fonts may have to be reloaded
  • introduced upgrade class for future updates
  • added: welcome message after plugin activation
  • added Codeable banner
  • fixed: PHP warning on missing key

0.16

  • using absolute path to support Google Fonts in Mailster.

0.15

  • using custom mirror to prevent down times

0.14

  • added info if https://google-webfonts-helper.herokuapp.com/ is down

0.13

  • improved: better explanations on errors.
  • improved: Higher propriety for wp_resource_hints to catch them all. Fixes #8
  • implemented an alias method for no longer supported fonts.
  • fixed: Syntax error on older PHP versions

0.12

  • Do not handle fonts sources with more than 30 families (why would you need that?)
  • Add option to choose subsets for each font family
  • Disable functionality in the customizer

0.11

  • fixed: problem on customizer in Neve theme
  • fixed wrong domain on translations
  • mise à jour de la F.A.Q. pour le thème DIVI

0.10

  • fixed: rending issue on some fonts (please reload fonts if you use one of these: « exo-2 », « inter », « jost » or « montserrat »)
  • fixed: some styles are not recognized and therefore not loaded.
  • improved: info about loaded font files on the admin screen
  • added timestamp to loaded font files to prevent cached fonts get loaded.

0.9

  • new: options to load fonts automatically

0.8

  • updated required WP version to 4.6
  • remove Text Domain header
  • added missing translatable strings

0.7

  • better handling of multiple « family » arguments in the URL

0.6

  • loading all variants if none explicit are requested
  • cache API requests
  • respect font-display
  • removes DNS prefetch and preconnect to Google server from page header

0.5

  • added option to flush everything

0.4

  • you may have to reload fonts so please check the settings page
  • improved handling of fonts
  • only loading required font files
  • supports now different types of variant declarations
  • add variants to list only if available in the source
  • added some css to improve settings page
  • you may have to reload fonts so please check the settings page

0.3

  • add explanation info on settings page

0.2

  • show info when no font is found
  • better handling of translated strings

0.1

  • initial release