Download the PHP package log1x/laravel-webfonts without Composer

On this page you can find all versions of the php package log1x/laravel-webfonts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-webfonts

Laravel Webfonts

Latest Stable Version Total Downloads Build Status

Laravel Webfonts allows you to easily download, install, and preload over 1500 Google fonts locally in your Laravel project.

Demo

Features

Requirements

Installation

Install via Composer:

Usage

If you already have fonts locally installed in your project, skip to Preloading Fonts.

Adding Fonts

Laravel Webfonts provides a very easy way to install new webfonts to your project using command line:

By default, installing a font will trigger the following things to happen:

The fonts stylesheet will reside at the root of your stylesheet directory located in resources/. If the font stylesheet does not already exist, it will be created using the most common stylesheet extension (css, scss, ...) found among your styles.

By default, the resources/css and resources/styles directories are automatically scanned for existing files to find the appropriate place to write the fonts stylesheet.

The generated @font-face at-rules will look like this:

Adding additional fonts will cause them to be prepended to the existing fonts stylesheet.

Importing Fonts

When fonts are installed for the first time, a fonts stylesheet is created in your project's stylesheet folder. In a vanilla Laravel project, this is typically resources/css/fonts.css.

You must import the generated fonts file into your project's primary stylesheet (e.g. app.css). If you're using Tailwind, it would look something like:

Preloading Fonts

[!NOTE] If you are using WordPress alongside Acorn, you can ignore this section as preloading is automatically handled for you inside of wp_head if an asset manifest containing valid fonts is detected.

Laravel Webfonts primary functionality while in production is to provide a simple way to preload your locally hosted webfonts.

This is done by reading the compiled woff2 fonts from your Vite or Bud manifest and generating the appropriate markup for you to place inside of <head>.

In most cases, you can simply use the @preloadFonts Blade directive to handle building and echoing the font preload HTML markup.

Alternatively to the Blade directive, you can access the PreloadFonts class directly using the Webfonts Facade:

Bug Reports

If you discover a bug in Laravel Webfonts, please open an issue.

Contributing

Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.

License

Laravel Webfonts is provided under the MIT License.


All versions of laravel-webfonts with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
laravel/prompts Version ^0.1.15
guzzlehttp/guzzle Version ^7.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package log1x/laravel-webfonts contains the following files

Loading the files please wait ....