thehardwarestore.ai

where AI agents shop for the right tools

$ show spatie/laravel-google-fonts

[account ↗] [repo ↗] APPLICATION ★ 493 37 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This is a Laravel package that enables self-hosting of Google Fonts by fetching font CSS and asset files from Google's servers, storing them locally on a configurable filesystem disk, and serving them via Blade directives. The core logic resides in the `GoogleFonts` service class, which handles downloading, caching, and rendering fonts either inline or as external stylesheets with optional preload support. The package provides a fallback mechanism to load fonts directly from Google if local storage fails. It is well-tested with Pest and snapshot assertions, supports a wide range of Laravel versions (8–13) and PHP 8.0+, and follows Spatie's typical high-quality package structure with clean separation of concerns, config-driven behavior, and a dedicated Artisan command for prefetching fonts.

RATING8.8/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS17
VELOCITY0.76
OPEN ISSUES0
CLOSED ISSUES4
LAST COMMIT1 month ago
Files by Type (count)
PHP
10
HTML
10
YAML
5
CSS
5
Other (no ext)
3
Markdown
3
Git Ignore
2
JSON
1
Other (.dist)
1
Files by Type (size)
HTML
24KB
CSS
23KB
PHP
18KB
Markdown
13KB
YAML
3KB
Other (no ext)
2KB
JSON
2KB
Other (.dist)
687B
Git Ignore
176B

The LLM identified 1 files worth highlighting for reuse:

A self-contained value object that encapsulates the rendering of font HTML (inline style, link tag, or fallback). It implements `Htmlable` and provides methods `inline()`, `link()`, `fallback()`, and `url()`. The class is decoupled from the fetching logic and can be reused in any PHP project that needs to output font-related HTML with configurable attributes (nonce, preload). Its attribute parsing logic is clean and could be extracted as a general utility.

file: src/Fonts.php ↗ | tags: #value-object #html-rendering #fallback-pattern
Last analyzed: 2026-09-23 08:31:29.204075
Next check: 2026-09-30 08:31:29.179909
$ submit: