Download Over 1,500 Google Fonts in Your Laravel Project
Last updated on by Paul Redmond
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-faceCSS 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_headon 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