Font Awesome

Posted on
Tue May 14, 2019 2:44 pm
howartp offline
Posts: 4460
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Font Awesome

Introducing the Font Awesome plugin

This plugin is written in response to a feature request on the forums.

It is very much a utility plugin, utilised only when requiring new icons from FontAwesome.com.

For those wanting to jump straight in, the latest download link is always at the bottom of this post.

Current Features
  • Download a single icon by name
  • List all available* icons and multi-select for download
  • Resize and change colour of icons as they are downloaded
  • *The FREE icons from Font Awesome are included in this package. (v5.8.2 at the time of writing; see update posts below for changes)
  • *PRO icons can be installed by yourself by following the instructions below

Coming soon
  • Provide colour picker instead of RBG textfield for colours
  • Provide max size HxW rather than just width

Planned for later
  • Unknown

Pre-requisites
  • Register for a free account at https://cloudconvert.com/
    • This is doing the conversions from SVG to PNG.
    • You can do 15 minutes worth of conversions per day for free, at ~5 seconds per conversion, which is around 180 icons per day.
    • Once you have registered, go to API account page and copy your API key into the plugin settings.
  • Install the Pillow package, assuming you want to use coloured icons.
    • "sudo pip install Pillow" should work if you have pip installed
    • "sudo easy_install pip" will install pip if you don't have it
    • If, like me, you get an error about no package found for versions, you might have an old version of pip:
    • "curl https://bootstrap.pypa.io/get-pip.py | sudo python" will upgrade it to v19.
  • OPTIONALLY register for a Pro account at https://fontawesome.com/
    • If you want to use the Pro icons, you need a Pro account
    • Once you've signed up, download the Pro for Desktop zip file.
    • Extract it then copy the CONTENTS of the "svgs" folder within it, into the following folder:
    • \Library\Application Support\Perceptive Automation\Indigo 7.3\Plugins\FontAwesome.indigoPlugin\Contents\Server Plugin\svgs
    • (There's a text file called "Paste PRO files here.txt" in that folder)

Installation notes
This plugin has two menu items under Plugins > Font Awesome.

The "Download Single Icon" menu asks for an icon name (eg 'alarm-clock') and style (eg 'solid') taken from the FontAwesome icon gallery

The "Download Multiple Icons" menu lists all the icons available in the plugin (Free icons by default, plus Pro if you've downloaded them), for you to multi-select.

Both then allow you to enter a width (in pixels) which the png image file will be created as, and a colour (default: 255,255,255). Entering any other RGB values will recolour any "black" in the icon to the new colour you type. (This will be a colour picker and foreground/background options eventually).

Upon submitting the dialog box, the icon(s) you've selected/typed will download. The full filename will be entered in the Indigo log, but they basically all save to the IndigoWebServer/Images/Controls folder where you would put images you sourced yourself. You will NEED to move them into a subfolder from there, either devices, variables or static, depending how you use the images on your control pages.

I name images by default as iconname_style_size_colour.png but you're welcome to rename them as you move them.

This plugin doesn't handle the +on, +off, +open, +closed file substitutions - it simply downloads and names the icon you requested; you can do whatever you want/need to with the image after you've downloaded it.

Download link - v1.0.4 Beta

FontAwesome.IndigoPlugin

Those who have seen me around the forums will know I usually participate in the forums at least daily if not several times; however please be aware this is usually from my iPhone when I'm away from my desk. I will endeavour to support this plugin as quickly as possible, but (as with everyone) I have busy periods of the year when I'm simply not at my desk long enough to do all I'd like to, including fixing or updating plugin code, even if you see me actively responding to other threads.

Enjoy!

Peter

Posted on
Tue May 14, 2019 3:16 pm
howartp offline
Posts: 4460
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Font Awesome

v1.0.3 uploaded with support for colour picker.

Posted on
Tue May 14, 2019 9:02 pm
howartp offline
Posts: 4460
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Font Awesome

v1.0.4 device functionality moved into menu Plugins > Font Awesome > Download icons

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest