kowal.info

Google Fonts

Composer kowal/module-fonts · Version 1.0.5

Product page

Google Fonts — kowal.co

Description

Adds the embed markup for a selected Google Fonts family to the storefront page head.

For whom

For teams implementing brand typography in a Magento theme.

Features

  • Load the font stylesheet across storefront pages.
  • Configure embed markup for a selected store view.
  • The default Open Sans example includes preconnect hints and a stylesheet link.

Installation

From the Magento root, with Composer access to the Kowal package, run

composer require kowal/module-fonts
bin/magento module:enable Kowal_Fonts
bin/magento setup:upgrade
bin/magento cache:clean

Configuration

  1. Open Kowal → kowalfonts → settings and turn on enable.
  2. Paste the HTML link elements for the desired family and styles into google_fonts. Save the configuration.
  3. Assign that family to the relevant elements in the theme stylesheet, for example font-family: 'Open Sans', sans-serif.

Requirements / notes

The module uses the head.additional block. The browser fetches the stylesheet and font files from the hosts referenced by the embed markup.

FAQ

Why does the font download while the text looks the same?

Loading the stylesheet makes the family available. Inspect the element’s computed styles to check that the theme names the same family and that its rule takes precedence.

Verify the installation

bin/magento module:status Kowal_Fonts

Open a page in the configured store view. In browser developer tools, check the Google Fonts stylesheet request and the actual font rendered for a heading.