wapplersystems/font-downloader

Automatically downloads external CSS fonts (Google Fonts, Font Awesome, ...) and serves them locally for GDPR compliance

Maintainers

Package info

github.com/WapplerSystems/t3-font-downloader

Homepage

Type:typo3-cms-extension

pkg:composer/wapplersystems/font-downloader

Statistics

Installs: 5 883

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

14.0.1 2026-04-25 23:56 UTC

This package is auto-updated.

Last update: 2026-04-25 23:59:37 UTC


README

Automatically downloads external CSS fonts and serves them locally. This improves GDPR compliance and page performance by eliminating third-party requests.

Installation

composer require wapplersystems/font-downloader

Requirements

  • TYPO3 v14
  • PHP 8.2+

Usage

Simply include external font CSS via TypoScript as usual:

page.includeCSS {
  opensans = https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap
  fontawesome = https://use.fontawesome.com/releases/v5.15.4/css/all.css
}

The extension automatically intercepts these external URLs, downloads the CSS and all referenced font files, stores them locally in typo3temp/assets/font-loader/, and rewrites the references. No further configuration needed.

Supported font providers

  • Google Fontsfonts.googleapis.com/css
  • Font Awesomefontawesome.com/releases

Adding a custom font loader

You can add support for additional providers by implementing FontLoaderInterface:

<?php

declare(strict_types=1);

namespace Vendor\MyExtension\FontLoader;

use WapplerSystems\FontDownloader\FontLoader\AbstractFontLoader;

class MyFontLoader extends AbstractFontLoader
{
    protected string $identifier = 'myprovider';

    public function isResponsible(string $url): bool
    {
        return str_contains($url, 'myprovider.com');
    }
}

Tag the service in Configuration/Services.yaml:

services:
  Vendor\MyExtension\FontLoader\MyFontLoader:
    tags: ['fontloader']

The load() method is inherited from AbstractFontLoader and handles downloading automatically.

Cache

Downloaded fonts are cached with infinite lifetime. To force a re-download:

vendor/bin/typo3 cache:flush --group=system

License

GPL-2.0-or-later