News

Download Over 1,500 Google Fonts in Your Laravel Project

Published
Download Over 1,500 Google Fonts in Your Laravel Project image

Laravel Webfonts is a package that allows you to easily download, install, and preload over 1,500 Google fonts locally in your Laravel project. Using the amazing Laravel Prompts feature, you can quickly search for fonts and install them via the CLI:

Following the prompts, this package will download the fonts to your project and generate a fonts.css stylesheet. You can then load this CSS file into your primary stylesheet. This package simplifies the steps required to add a font to your project.

Here are the main features this package provides:

  • Search and install over 1,500 Google fonts from the public google-webfonts-helper API.
  • Automatically generate @font-face CSS at-rules when installing fonts using CLI.
  • Supports Vite and Bud out of the box with zero configuration.
  • Provides an easy-to-use @preloadFonts Blade directive to preload fonts found in the Vite/Bud manifest.
  • Automatically injects font preload markup into wp_head on WordPress sites running Acorn.

You can learn more about this package, get full installation instructions, and view the source code on GitHub.

Related post: Manage self-hosted Google Fonts in Laravel apps

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Filed in

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
CPX: The Composer Package Executor for PHP image

CPX: The Composer Package Executor for PHP

Read article
Laravel AI SDK Adds Human-in-the-Loop Tool Approval image

Laravel AI SDK Adds Human-in-the-Loop Tool Approval

Read article
Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals image

Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals

Read article
Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs image

Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs

Read article
Blade Formatting in Laravel Pint image

Blade Formatting in Laravel Pint

Read article
Inertia DevTools Is Now on the Chrome Web Store image

Inertia DevTools Is Now on the Chrome Web Store

Read article