Font Awesome Manager

Font Awesome Manager 1.2.7

No permission to download
I don't use CentOS so I haven't tested this myself but rather included Informationen that was provided by users.

To me it seems like your command sequence is a bit of a mix between Python 2 (pip) and Python 3 (pip3).

Maybe others who actively use CentOS can shed some light on this?
@Mr. Jinx @eva2000
I was just reacting to errors as they came up & Googling. No real clue what any of it actually does ha.
eg for this error "ImportError: No module named typing" the google advice was basically "typing isn't included in your version of pip, try using pip3 instead"
 
Last edited:
Currently there is no programmatic way to register icons that are not detected automatically, though adding such a feature in future versions should be possible.
I think this would be awesome. Then we cann add the entities etc. during AddOn Install.
 
@Hoffi
I am not sure if I am going to add smth. that could be used in setup code.

Doing so would require to build quite a bit of infrastructure to maintain this data and (if done actively) developers would have to check if FAM is installed or not to do the registration stuff.

Another approach could be to extend Add-on data and add code in FAM to handle that, but this approach would require even more infrastructure and I am not sure if this would make it much easier than other approaches.

Both approaches most likely also wouldn't work if FAM is installed after an Add-on that has FAM setup code (or data).

Therefore I am currently favouring to add two new code events:
One to add entities (eg. for situations like your NodeIcons Add-on) and one to add icons (for situations where statically used icons cannot be detected automatically for whatever reason).

This would be easy to add, does not require much infrastructure and would also be easy for developers to support as well; just add an event listener and be done.

If the FAM is installed the event listender would be used, if FAM is not installed on the target system nothing would happen.

What do you think about this?
 
Last edited:
Therefore I am currently favouring to add two new code events:
One to add entities (eg. for situations like your NodeIcons Add-on) and one to add icons (for situations where statically used icons cannot be detected automatically for whatever reason).

This would be easy to add, does not require much infrastructure and would also be easy for developers to support as well; just add an event listener and be done.

If the FAM is installed the event listender would be used, if FAN is not installed on the target system nothing would happen.

What do you think about this?
That sounds pretty good, and is also for AddOn Developers an easy way to integrate.
 
Great job @Kirby

I've had a lot of folks request this to be implemented at a style level somehow but it's practically impossible to support. This will be a massive help to a lot of communities!
It would be awesome ;) if style developers could include a list that could be manually copy/pasted as part of their theme development :)
 
If style developers could include a list that could be manually copy/pasted as part of their theme development :)
Normally icons used in styles should be detected automatically (unless they are not being used in the selected FA weight or used in uncommon ways).

I'll think about how things could be made easier for designers as well :)
 
I was just reacting to errors as they came up & Googling. No real clue what any of it actually does ha.
eg for this error "ImportError: No module named typing" the google advice was basically "typing isn't included in your version of pip, try using pip3 instead"
Same thing happened to me. Used the pip3 info in your last post to get it installed.
 
@Kirby our styles currently call FA icons using the following methods:

Message user info icons if enabled (template edit)
Code:
<xf:fa icon="fa-calendar fa-fw" data-xf-init="tooltip" title="{{ phrase('joined') }}" />

Other possible icon if the options are enabled (CSS method)
Code:
.m-faContent("\f2f6")
.m-faContent(@fa-var-sign-in-alt)


Would this add-on pick those methods up?
 
@Kirby our styles currently call FA icons using the following methods:

Message user info icons if enabled (template edit)
Code:
<xf:fa icon="fa-calendar fa-fw" data-xf-init="tooltip" title="{{ phrase('joined') }}" />

Other possible icon if the options are enabled (CSS method)
Code:
.m-faContent("\f2f6")
.m-faContent(@fa-var-sign-in-alt)


Would this add-on pick those methods up?
Everything FA wise is working great on my BOLT powered dev site, Russ. No missing icons.
 
Everything FA wise is working great on my BOLT powered dev site, Russ. No missing icons.

Good to hear, I guess my biggest worry comes from:

Style properties -> Header and navigation -> Enable navigation icons
Style properties -> Messages -> Message user icons
Style properties -> Sidebar -> Sidebar Icons
 
Good to hear, I guess my biggest worry comes from:

Style properties -> Header and navigation -> Enable navigation icons
Style properties -> Messages -> Message user icons
Style properties -> Sidebar -> Sidebar Icons
Lemme make sure those are turned on and you can re-check.
 
Feature request.

Please add base url/hostname option, so that we can host the font files on CDN.
Thanks!
 
What about this? Does it take effect in UI.X 2 then? 🙄 I feel it's faster though or is it just my illusion?

1)
V0pAY1.jpg

2)
JI4jCS.jpg

3)
FPscgU.jpg

4)
HnCWQ2.jpg

5)
ynpgBe.jpg
 
Last edited:
Please add base url/hostname option, so that we can host the font files on CDN.
I am not sure if it would be a good idea (from a performance perspective) to just serve the fonts from a CDN, but I'll add an option for that.

What about this?
Please read the FAQ, all of those messages are explained there.
FAM completely rewrites fa.css and it is almost certain that this will not work correctly if the tamplate has been customized.
Subset too large to be processed is an error that does prevent subsets from being generated and is a clear indicator that thare is an issue with one or more of your templates.
You'll most likely have to find out which templates are causing this and ignore them.


Would this add-on pick those methods up?
FAM would detect the icon in all those cases, but only for the main subset.

What does that mean?

Consider the following LESS
Code:
// Case 1
.myWeightIndependentFaIcon
{
    .m-faBase();
    .m-faContent(@fa-var-sign-in-alt)
}

// Case 2
.mySolidFaIcon
{
    .m-faBase('Pro', @faWeight-solid);
    .m-faContent(@fa-var-sign-in-alt)
}

// Case 3
.myUnknownWeightFaIcon
{
    .m-faBase('Pro', @someArbitraryLessVariable);
    .m-faContent(@fa-var-sign-in-alt)
}

// Case 4
.myFaIconWithoutWeight
{
    .m-faContent(@fa-var-sign-in-alt)
}

.myFaBase
{
    .m-faBase();
}

Case 1 is easy:
The icon is being used in the selected weight; FAM will pick this up and use it for the main subset (= selected weight).

Case 2 is already a bit more complicated:
The icon is always being used in solid weight, no matter which weight is selected for the style.
FAM currently does not detect this and will use the icon for the main subset only.
So if the user is not using solid as the selected weight and has style property Only use CSS for selected weight enabled, the icon in solid would be missing.
It should be possible to auto-detect this, but that requires a more complex scanning algorithm and is therefore out of scope for 1.2.0, but I do have plans to support this in a later version.

Case 3 does get even more complicated:
Without knowing the value of someArbitraryLessVariable, if is impossible to determine the weight.
This would therefore require full LESS processing while scanning the template.
Factor in conditions (based on style properties) and it does get even more complicated to correctly detect the weight and react on changes in this case.
It might not be completely impossible to support this to some extend, but this is currently way out of scope.

Case 4 is more or less a lost case:
As the content and the weight are defined defined in disjuct selectors, it is impossible to know the weight for the icon in class myFaIconWithoutWeight
 
Last edited:
Bug report:

"Automatically add missing icons" is checked....figured I'd leave that in place so any missed during initial install would be caught and added.

The handful of missing icons used by PixelExit appears to be added into my FA lists. ie:
  • lightbulb
  • external-link-square

HOWEVER....they were not appearing on my forum pages, only blanks or placecard square icons were present. Once I edited/saved the settings at https://forumdomain.com/admin.php?options/groups/kirbyFAM/ and refreshed the forum pages, only then did the FA icons appear.

It seems the plugin does not auto-save as it updates missing icons ??
 
It seems the plugin does not auto-save as it updates missing icons ??
I can't reproduce this.

Here is what I did test on the Default Style:
  1. Enabled Automatically add missing icons
  2. Added <i class="fa fa-ambulance"></i> (ore any other icon that is not on the solid icons list) to a template
  3. Reloaded the page and verified that the icon is missing
  4. Verified that the icon was added to the list of solid icons
  5. Waited a few minutes
  6. Reloaded the page again

After that last step the icon was being shown.

Please note that missing icons are logged immediately, but a rebuild is not being triggered immediately - it is scheduled to be run after 60 seconds.
This is being done to allow a few missing icons to accumulate and thus avoid excessive rebuilds (if there are quite a few missing icons).

You can also verify this by setting log level to Info or higher.
 
Last edited:
Back
Top Bottom