Code name for the latest iteration of acl-icon-font is Fontastic 4, because we have updated and unified the icons style. It contains all latest icons we use in our applications UI. Fontastic 4 is the go to place for everything related to icon font. Visit icon font cheatsheet. Last but not least, it has all the awesomeness that Sketch, Sketchtool, Node.js and Gulp have to offer.
Use it on your machine acl-icon is a font like other TrueType fonts, therefore it can be used in a design (Sketch, Photoshop, Illustrator, MS Word...) and in HTML.
You need a Mac. We use Sketch as primary design tool and it is only available on Mac. So is Sketchtool. You don’t need Sketch if you are not updating the icon. And you don’t need Sketch to install Sketchtool.
In addition, You have latest Node.js installed, Gulp and Harp installed with -g
flag.
If you don’t:
Install Node.js. It is recommended to use Nodenv for managing multiple versions of Node.js.
$ brew install nodenv
$ nodenv install v4.0.0
Install gulp $ npm install -g gulp
Install harp $ npm install -g harp
Sketchtool is now bundled with lasted Sketch app. If you have already installed Sketch, from terminal run:
$ cd /Applications
$ Sketch.app/Contents/Resources/sketchtool/install.sh
That will install the tool in /usr/local/bin
, and some required resource files in /usr/local/share/sketchtool
.
$ git clone git@github.com:acl-services/acl-icon-font.git
$ cd acl-icon-font
$ npm install
This project is not possible without the following awesome gulp plugin:
Add the following line in your project’s bower.json dependencies:
"acl-icon-font": "https://github.com/acl-services/acl-icon-font.git"
It depends on the project’s build process, you could either link directly to bower_components
directory, or copy font file and css to assets folder. acl-ui
has a gulp task to copy acl-icon-font
assets to its directory.
Bonus: You can also download and install the TTF font file to your system and use it in a design program.
resources/sketch-template/acl-icon.sketch
cd
to acl-icon-font
$ npm start
$npm install
first$ gulp
localhost:9000
in a browser to view your changes.$ gulp; gulp
bower.json
and package.json
Gulp task takes care of:
gulp
several times before the localhost reflects the changesThere are a few things to keep in mind:
nnn.icon-name__tag1__tag2__tag3...
Where:
nnn
ranges from 001 to 999icon-name
is the CSS class name and also exported svg filename. Multiple words used in name are separated by -
tag
is another name you think the icon may also be referred to. A tag is optional but it will be helpful when you need to search for an icon. For example: trash-bin
may also be referred as delete
.__
(double underscores) is a tag separator.Want to test an update to the icon font without needing to open a PR, and without downloading the local dev environment for every one of our apps? YES I DO!
$('head').append('<style>@font-face{font-family: "acl-icon-font"; font-weight: normal; font-style: normal; src: url("https://rawgit.com/pxsmith/icon-font-testing/master/acl-icon-font.eot"); src: url("https://rawgit.com/pxsmith/icon-font-testing/master/acl-icon-font.eot") format("eot"), url("https://rawgit.com/pxsmith/icon-font-testing/master/acl-icon-font.woff") format("woff"); src: url("https://rawgit.com/pxsmith/icon-font-testing/master/acl-icon-font.ttf") format("ttf");}@font-face{font-family: "acl-icon-font"; font-weight: normal; font-style: normal; src: url("https://rawgit.com/pxsmith/icon-font-testing/master/acl-icon-font.woff") format("woff");}@media screen and (-webkit-min-device-pixel-ratio: 0){@font-face{font-family: "acl-icon-font"; src: url("https://rawgit.com/pxsmith/icon-font-testing/master/acl-icon-font.svg") format("svg");}}</style>');
(Note: you may need to clear your cache to see your changes)Run npm pack
and upload the .tgz
file to Gemfurry. (For more info check Gemfurry's docs)
Important: As Bohemian Coding updates quite often, if something is not working as expected, please check the version of your software including Node and Gulp.
This project is tested with:
node --version
Install: brew install node
Update: brew upgrade node
npm install --global gulp-cli
Copyright (c) 2016 ACL Services Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.