Download the PHP package webfer/custom_bootstrap_icon_font without Composer

On this page you can find all versions of the php package webfer/custom_bootstrap_icon_font. 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 custom_bootstrap_icon_font

Custom Icon Font Builder (Bootstrap Icons + Font Awesome Free → WOFF2) for Drupal

A Drupal module that generates a custom icon font (WOFF2 + optional WOFF) from a selected subset of Bootstrap Icons and/or Font Awesome Free SVGs, and publishes matching CSS classes.

🚀 Why? Keep your frontend lightweight: instead of shipping entire icon sets, you can select only the icons your site actually uses and generate a small, focused font + CSS just for those.


📦 Module Overview

This module:

Key features


🛠 Installation

✅ Install with Composer (recommended) 🧰

From your Drupal project root:

Composer will install the module into your Drupal codebase (commonly under web/modules/contrib/ in standard Drupal Composer templates). 📦

Then enable the module:

🧩 Install without Composer (development only)

If you’re developing locally, you can still place the module folder under:


✅ Requirements

Drupal

Bootstrap Icons SVG sources

The build needs access to the Bootstrap Icons SVG files (*.svg).

Recommended location (Drupal libraries):

You can install Bootstrap Icons there by either:

Font Awesome Free SVG sources

Font Awesome icons are not bundled by this module. You provide the SVGs.

Recommended location (Drupal libraries):

Where to obtain icons:

Recommended workflow:

  1. Find an icon in the Free collection.
  2. Download the SVG.
  3. Upload it into web/libraries/fontawesome/icons.
    • You can use the admin UI “Upload SVG icons (optional)” section.
    • Note: some hosts do not allow writing to DRUPAL_ROOT/libraries from the web UI; in that case upload via SFTP/CI.
  4. Paste the corresponding snippet into the Font Awesome list (example: <i class="fa-solid fa-arrow-down"></i>).

Node tooling (required for building assets)

Asset generation uses Fantasticon, typically via npx fantasticon.

You need:

Tip 💡: If you plan to build from the admin UI (“Save and build now”), the same Node tooling must also be available to the PHP/web user, and the request must be allowed to run long enough.

Recommended (project-level, deterministic):

Alternative (global install):

Important:


⚙ Configuration

1) Permissions

The admin UI requires:

Assign it under People > Permissions.

2) Build / update the font

Go to:

On this page you can:

Optional: Upload SVG icons from the UI

The admin page also includes an Upload SVG icons (optional) section.

If your server does not allow writing to DRUPAL_ROOT/libraries from PHP, upload icons via SFTP/CI instead.

✅ Build assets (two options)

Option A: Build from the UI (friendly) 🖱️

  1. Click Save and build now.
  2. The module generates the CSS + font files under public://custom_bootstrap_icon_font/font/.

This is great for local/dev. On production, Drush is usually safer (no web timeouts and doesn’t require Node to run during a web request).

Option B: Build via Drush (recommended) 🧑‍💻

Aliases are kept for backwards compatibility:

When the build completes, the module:


🧩 Usage

Option A: CSS classes (Bootstrap-like)

After generating assets, you can render icons using classes and a pseudo-element:

Notes:

Option B: Twig helper

This module provides:

Backwards-compatible Twig function names are also available (if you used older templates):

🧱 Fantasticon specification

This module is a thin wrapper around the Fantasticon CLI.

Inputs

Generated Fantasticon config

During drush di-font:build, the module stages the selected SVGs into a temporary folder and generates a Fantasticon JSON config equivalent to:

Important details:

Outputs

Files written to public://custom_bootstrap_icon_font/font/:


🎨 Styling

Because this is a font:

Example:


🚨 Troubleshooting


📂 File Structure


📜 License

This project is licensed under the GNU General Public License, version 2 or (at your option) any later version.


_Created and maintained by WebFer


All versions of custom_bootstrap_icon_font with dependencies

PHP Build Version
Package Version
Requires drupal/core Version ^10 || ^11
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 webfer/custom_bootstrap_icon_font contains the following files

Loading the files please wait ...