dethfire

Well-Known Member
Maybe xenbase can implement this?
 

dethfire

Well-Known Member
I see now that there are license issues so xenbase can do this stock, but @Russ, do you have a list of the additional icons used in xenbase, not listed in this resource, that we can plug into fontforge?
 

McAtze

Customer
The best way to reduce the FontAwesome fonts or files is to change the template font_awesome_setup, so you only request the required font and not all fonts. Your addon is nice, but if you reduce the included fonts there are always issues with third party addons and/or themes.

Look for the template font_awesome_setup..
Original template:
<xf:set var="$faVersion">5.12.1</xf:set>

<xf:if is="fa_weight() == 'l'">
    <link rel="preload" href="{{ base_url('styles/fonts/fa/fa-light-300.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
<xf:elseif is="fa_weight() == 'r'" />
    <link rel="preload" href="{{ base_url('styles/fonts/fa/fa-regular-400.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
<xf:elseif is="fa_weight() == 's'" />
    <link rel="preload" href="{{ base_url('styles/fonts/fa/fa-solid-900.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
</xf:if>
<xf:if is="fa_weight() != 's'">
    <link rel="preload" href="{{ base_url('styles/fonts/fa/fa-solid-900.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
</xf:if>

<link rel="preload" href="{{ base_url('styles/fonts/fa/fa-brands-400.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
Screenshot 2020-06-02 17.51.13.png


and change it to..
Changed template:
<xf:set var="$faVersion">5.12.1</xf:set>

<xf:if is="fa_weight() == 'l'">
    <link rel="preload" href="{{ base_url('styles/fonts/fa/fa-light-300.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
<xf:elseif is="fa_weight() == 'r'" />
    <link rel="preload" href="{{ base_url('styles/fonts/fa/fa-regular-400.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
<xf:elseif is="fa_weight() == 's'" />
    <link rel="preload" href="{{ base_url('styles/fonts/fa/fa-solid-900.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
<xf:else />
    <link rel="preload" href="{{ base_url('styles/fonts/fa/fa-solid-900.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
</xf:if>

<link rel="preload" href="{{ base_url('styles/fonts/fa/fa-brands-400.woff2?_v=' . $faVersion) }}" as="font" type="font/woff2" crossorigin="anonymous" />
Screenshot 2020-06-02 17.51.39.png


The change is only the if/else request to load just the font you choose in the style properties.
 

dethfire

Well-Known Member
The best way to reduce the FontAwesome fonts or files is to change the template font_awesome_setup, so you only request the required font and not all fonts. Your addon is nice, but if you reduce the included fonts there are always issues with third party addons and/or themes.
I actually did this awhile back but they were still loading via js

fa.PNG
 

Russ

Pixel Exit Staff
That's not something I'd want to support on a style level, to be honest. It'd be a nightmare to support everyone. Plugins, custom nav icons, node icons, specific icon changes, font awesome weight changes, and so many more it just seems like a never-ending road of changes, this should be done at a per-site level.

I haven't dived too far into it, but really the only additional icons we use are in the sidebar headings and navigation. Both of which are completely optional.
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.