XF2 Add-on [Xenforo] Font Awesome Manager 1.2.7

TheProphet

Member
XNullUser
Joined
Oct 19, 2022
Messages
39
Reaction score
8
Points
8
NullCash
188
XenForo uses the icon font Font Awesome Pro 5 that contains over 7.000 icons of which XenForo typically uses only a few hundred.
But as all icons are included in the CSS and font files, browsers have to download the full font files and CSS which does cause a significant overhead in most cases.

By subsetting the font to include only those icons that are actually being used, the size of the font files and CSS can often be drastically reduced which does improve page loading time.
Typically, the size of the font files can be reduced by over 80%.

This Add-on does allow to automate the process of creating subsets as much as possible:

  • It can automatically scan the database and PHP files for Font Awesome icon references
  • It can monitor database entities (like Phrases, Templates, BB-Codes, etc.) for changes and adjust the subset accordingly
  • It can perform subsetting using locally installed fonttools/pyftsubset or Subfonter.net webservice
  • It does allow you to easily add icons that are not discovered automatically
  • It does allow you to exclude icons that have been discovered automatically but are not actually being used (for example if the feature that uses them is not being used)
  • It can exclude certain templates or files from being scanned (which can be useful if those reference icons without actually using them)
  • It does offer various strategies to load subsets and CSS
  • It does support AMPXF
If pyftsubset cannot be installed system-wide for whatever reason, it might still be possible to use a precompiled binary.

It is strongly recommended to use pyftsubset if possible, please try to get this working before trying any other options.

If pyftsubset cannot be used at all, this Add-on can use Subfonter.net as "last resort" to create the subsets, eg. it does make calls to this webservice during normal operation if Subfonter.net is selected as processor.
 

Attachments

  • Kirby-FontAwesomeManager-1.2.7.zip
    84 KB · Views: 0
  • fam-options.png
    fam-options.png
    83.4 KB · Views: 0
  • fam-style-properties.png
    fam-style-properties.png
    45 KB · Views: 0

orkos

New member
XNullUser
Joined
May 22, 2022
Messages
27
Reaction score
0
Points
1
NullCash
9
Thank you for sharing this addon!!
Post automatically merged:

Thank you for this addon, i will test it!
 
Last edited:
Top