Font Awesome Manager

Font Awesome Manager 1.2.7

No permission to download
Installed and improved score for both sites. Thanks. :)

Had an issue with pyftsubset because the server had Python 2.7 & 3.6 installed (with 2.7 active/default).

When installing fonttools python advised pip needed updating, and when trying to update pip it tried to update 2.7 with 3.6 files, so had to manually update:
Code:
# wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
# python get-pip.py.2
# pip install --upgrade setuptools
# pip install --upgrade pip

Once installed and tested, decided to make Python 3 the default:
Code:
# alias python='/usr/bin/python3.6'
Then to make the change stick:
Code:
# sudo vi ~/.bashrc
... and add the alias line and write, quit.
 
What a dream plugin! My forum's FontAwesome woff2 files were consuming 16GB/day, or nearly half a terabyte of bandwidth every month — most of it wasted.

It has now been 24 hours since I installed the plugin (with the help of Centminmod's pyftsubset install guide), and the results speak for themselves. Here's a Cloudflare graph of bandwidth consumed by woff files. I enabled the plugin around midnight on Saturday, February 5...

Screen Shot 2022-02-05 at 11.20.35 PM.webp
 
reinstalled the addon and setup pfbutthead or whatever its called and i'm having trouble getting the chat icons to show up for siropu's chat, either in the nav bar or in the addon chat window itself. using flat awesome still. any suggestions would be welcome.
 
pfbutthead
🤣

To answer your question, try this:
Some icons are missing, how can I fix this?
This can (and depending on the Style and/or Add-ons will) happen.

Although the Add-on does try to automatically discover as many used icons as possible, it is not possible to find every icon.

If an icon is missing, it can easily be added to the appropriate list to make it available.

There are 4 lists
  • Icons
    This list is for icons that are being used in the selected Font Awesome weight (the default style does use Regular).
  • Light Icons
    This list is for icons that are being used in light weight.
    It is only being used if style property Only use CSS for selected weight is enabled and the selected Font Awesome weight is not Light.
  • Regular Icons
    This list is for icons that are being used in regular weight.
    It is only being used if style property Only use CSS for selected weight is enabled and the selected Font Awesome weight is not Regular.
  • Solid Icons
    This list is for icons that are being used in solid weight.
    It is only being used if style property Only use CSS for selected weight is enabled and the selected Font Awesome weight is not Solid.
If the name and/or weight of a missing icon is unknown, the easiest way to add it is to temporaily enable the option Automatically add missing Icons and reload the page where the icon(s) are missing.
This will automatically add the missing icon and rebuild the subsets.
 
You can also use Chrome's inspector to look at the icon, then see if the icon's name is revealed in CSS or, more likely, it's character unicode. Just enter that unicode into the character lookup on FontAwesome.com and it will tell you the icon's name.

For example, here's the CSS you see if you use the inspector to look at the thumbs up icon next to the "Like" button on XenForo:

Screen Shot 2022-02-07 at 4.01.38 PM.webp

The "content" property contains the thumbs-up icon's unicode, "\f164", which you can verify by putting that into FontAwesome.com's search box.
 
You can also use Chrome's inspector to look at the icon, then see if the icon's name is revealed in CSS or, more likely, it's character unicode. Just enter that unicode into the character lookup on FontAwesome.com and it will tell you the icon's name.

For example, here's the CSS you see if you use the inspector to look at the thumbs up icon next to the "Like" button on XenForo:

View attachment 264472

The "content" property contains the thumbs-up icon's unicode, "\f164", which you can verify by putting that into FontAwesome.com's search box.
i don't see that all i see is fa-facomments. for the icon inside the chat box i don't see anything.

looks like this:

DressedWell 2022-02-06 18-52-41.webp
 
Just noticed Font Awesome 6 went live today. Not sure if this is going to matter for the add-on. Just letting @Kirby know.


XenForo comes with and uses FA5 Pro. Maybe we have to wait until next XF major version. Hopefully XF can get an enterprise version with FA6 Pro.
 
What is this and should I worry? I get it 1-2 times a week.
I am only asking because I can not read anything of this.

Code:
GuzzleHttp\Exception\ClientException: Client error: `GET https://transfonter.org` resulted in a `403 Forbidden` response: <html> <head><title>403 Forbidden</title></head> <body bgcolor="white"> <center><h1>403 Forbidden</h1></center> <hr> (truncated...) src/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Generated by: Unknown account

Code:
Stack trace
#0 src/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 src/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 src/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 src/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 src/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true)
#5 src/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 src/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 src/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 src/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 src/vendor/guzzlehttp/guzzle/src/Client.php(131): GuzzleHttp\Promise\Promise->wait()
#10 src/vendor/guzzlehttp/guzzle/src/Client.php(89): GuzzleHttp\Client->request('get', 'https://transfo...', Array)
#11 src/addons/Kirby/FontAwesomeManager/Processor/Transfonter.php(75): GuzzleHttp\Client->__call('get', Array)
#12 src/addons/Kirby/FontAwesomeManager/Processor/Transfonter.php(308): Kirby\FontAwesomeManager\Processor\Transfonter->getUserId()
#13 src/addons/Kirby/FontAwesomeManager/Helper.php(215): Kirby\FontAwesomeManager\Processor\Transfonter->createSubsets(Array, '/home/fairgamb/...', Array)
#14 src/addons/Kirby/FontAwesomeManager/Job/FontAwesome.php(806): Kirby\FontAwesomeManager\Helper->createSubsets(Array)
#15 src/addons/Kirby/FontAwesomeManager/Job/FontAwesome.php(133): Kirby\FontAwesomeManager\Job\FontAwesome->rebuildFontFiles(Array, Array)
#16 src/XF/Job/Manager.php(260): Kirby\FontAwesomeManager\Job\FontAwesome->run(7.99678)
#17 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.99678)
#18 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.99678)
#19 job.php(43): XF\Job\Manager->runQueue(false, 8)
#20 {main}

Code:
Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(48) "https://www.betting-forum.com/admin.php?add-ons/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
I have noticed that when you check the cache of a website on Google, the font awesome icons are missing when in actual fact they aren't missing when visiting the webpage itself. I have noticed that the icons with font-weight 800 seem fine.

Check here for example: https://webcache.googleusercontent....-longest-day.12032/+&cd=1&hl=en&ct=clnk&gl=uk

I'm not sure if this is something to worry about because all webpages that are cached by Google have the icons missing since using this add-on.

Edit: Never mind. I just checked the cache on Google for XenForo and other forums and it seems Google doesn't like font awesome icons for some reason.
 
Last edited:
Edit: Never mind. I just checked the cache on Google for XenForo and other forums and it seems Google doesn't like font awesome icons for some reason.
You may want to read up on CORS :-)

In layman's terms: It is absolutely normal that webfonts won't be displayed on 3rd party websites (like Google) unless the origin server is explicitely configured to allow such cross site requests.
 
No, unfortunately not. You'll need to use the web service included.
This won't work either as they are blocking XenForo useragent since a few weeks (probably because of too many requests caused by this Add-on).

So right now the only option is to use pyftsubset, if this can't be used the Add-on can't be used at all (unless the User-Agent is changed, IIRC there is an Add-on available to do this).
 
This won't work either as they are blocking XenForo useragent since a few weeks (probably because of too many requests caused by this Add-on).

So right now the only option is to use pyftsubset, if this can't be used the Add-on can't be used at all (unless the User-Agent is changed, IIRC there is an Add-on available to do this).
The user-agent add-on works fine... install the user-agent addon, temporarily change it, rebuild FAM using the ACP 'rebuild caches' 'Rebuild Font Awesome subsets' option, change the user-agent back. 👍
 
That seems useful.

Worth noting though that this add-on could also adjust the user agent on the fly temporarily. It's perhaps slightly hacky but I'm sure it would work. Key is to create the client from scratch (otherwise it may be cached already in the request) but pass in a specific option to indicate you have created the client:

PHP:
$client = $app->http()->createClient(['FAM' => true]);

You can then use the http_client_options code event listener to override the User-Agent header:

PHP:
if (!empty($options['FAM'])
{
    unset($options['FAM']);
    $options['headers']['User-Agent'] = 'whatever';
}

For now, we're not supporting pyftsubset. We can consider it down the line if it becomes essential but I really do think the HTTP request approach is the only way right now. Either by changes to this add-on to workaround the user agent issue or using the other add-on to swap the UA.
 
Top Bottom