Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Allow users to easily and conveniently use font imported from Fontello in their theme and module.
Installl and import font
- Select and download font from Fontello.
- Enable module MD Fontello
- Go to admin/structure/md_fontello/add, add name and downloaded file to import.
Using icon
Use with twig syntax:
{{ md_icon('font_name', 'class_icon') }}
example
{{ md_icon('font_awesome', 'icon-video') }}
Add libraries font only:
-
Twig:
{{ attach_library('md_fontello/md_fontello.machine_name') }}
example
{{ attach_library('md_fontello/md_fontello.font_awesome') }}
- Or hook_page_attachments
function hook_page_attachments(array &$attachments) { // Unconditionally attach an asset to the page. $attachments['#attached']['library'][] = 'md_fontello/md_fontello.font_awesome'; }
Integrations
- Field Icon: Support field icon with UI selecter
- Field Link: Support field link show with icon
Attachment | Size |
---|---|
Field icon | 16.56 KB |
Field link with icon | 13.39 KB |
Project information
- Module categories: Media
- 100 sites report using this module
- Created by megadrupal on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
8.x-1.8
released 13 November 2023
Works with Drupal: ^9.3 || ^10
✓ Recommended by the project’s maintainer.
The one with D10 support 🔟🚀 (for real this time 🤞)
Install:
Development version: 8.x-1.x-dev updated 13 Nov 2023 at 22:42 UTC