Skip to content

Commit

Permalink
Add support for Feather icons (#546)
Browse files Browse the repository at this point in the history
* Add support for Feather icons

* Fix a small bug in the Feather.js icon set generation

* Fix permissions of Feather.ttf

* Fix the Feather font family and name

* Add typings for the Feather module

* Revert "Add support for Feather icons"

This reverts commit 372006e.

* Add dependency feather-icons

* Add support for Feather icons

* Add the Feather icons to the icon index

* Update README to include Feather icons
  • Loading branch information
kleiram authored and oblador committed Sep 16, 2017
1 parent c5a2457 commit 53d845c
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Feather.js
@@ -0,0 +1,18 @@
/**
* Feather icon set component.
* Usage: <Feather name="icon-name" size={20} color="#4F8EF7" />
*/

import createIconSet from './lib/create-icon-set';
import glyphMap from './glyphmaps/Feather.json';

const iconSet = createIconSet(glyphMap, 'Feather', 'Feather.ttf');

export default iconSet;

export const Button = iconSet.Button;
export const TabBarItem = iconSet.TabBarItem;
export const TabBarItemIOS = iconSet.TabBarItemIOS;
export const ToolbarAndroid = iconSet.ToolbarAndroid;
export const getImageSource = iconSet.getImageSource;

Binary file added Fonts/Feather.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -10,6 +10,7 @@ Perfect for buttons, logos and nav/tab bars. Easy to extend, style and integrate

* [`Entypo`](http://entypo.com) by Daniel Bruce (**411** icons)
* [`EvilIcons`](http://evil-icons.io) by Alexander Madyankin & Roman Shamin (v1.8.0, **70** icons)
* [`Feather`](http://feathericons.com) by Cole Bemis & Contributors (v3.2.2, **240** icons)
* [`FontAwesome`](http://fortawesome.github.io/Font-Awesome/icons/) by Dave Gandy (v4.7.0, **675** icons)
* [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0, **283** icons)
* [`Ionicons`](http://ionicframework.com/docs/v2/ionicons/) by Ben Sperry (v3.0.0, **859** icons)
Expand Down
5 changes: 5 additions & 0 deletions directory/src/App.css
Expand Up @@ -8,6 +8,11 @@
src: url('../../Fonts/EvilIcons.ttf') format('truetype');
}

@font-face {
font-family: 'Feather';
src: url('../../Fonts/Feather.ttf') format('truetype');
}

@font-face {
font-family: 'FontAwesome';
src: url('../../Fonts/FontAwesome.ttf') format('truetype');
Expand Down
2 changes: 2 additions & 0 deletions directory/src/App.js
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import './App.css';
import Entypo from '../../glyphmaps/Entypo.json';
import EvilIcons from '../../glyphmaps/EvilIcons.json';
import Feather from '../../glyphmaps/Feather.json';
import FontAwesome from '../../glyphmaps/FontAwesome.json';
import Foundation from '../../glyphmaps/Foundation.json';
import Ionicons from '../../glyphmaps/Ionicons.json';
Expand All @@ -15,6 +16,7 @@ import Zocial from '../../glyphmaps/Zocial.json';
const IconFamilies = {
Entypo,
EvilIcons,
Feather,
FontAwesome,
Foundation,
Ionicons,
Expand Down
242 changes: 242 additions & 0 deletions glyphmaps/Feather.json
@@ -0,0 +1,242 @@
{
"activity": 61696,
"airplay": 61697,
"alert-circle": 61698,
"alert-octagon": 61699,
"alert-triangle": 61700,
"align-center": 61701,
"align-justify": 61702,
"align-left": 61703,
"align-right": 61704,
"anchor": 61705,
"aperture": 61706,
"arrow-down": 61707,
"arrow-down-left": 61708,
"arrow-down-right": 61709,
"arrow-left": 61710,
"arrow-right": 61711,
"arrow-up": 61712,
"arrow-up-left": 61713,
"arrow-up-right": 61714,
"at-sign": 61715,
"award": 61716,
"bar-chart": 61717,
"bar-chart-2": 61718,
"battery": 61719,
"battery-charging": 61720,
"bell": 61721,
"bell-off": 61722,
"bluetooth": 61723,
"bold": 61724,
"book": 61725,
"bookmark": 61726,
"box": 61727,
"briefcase": 61728,
"calendar": 61729,
"camera": 61730,
"camera-off": 61731,
"cast": 61732,
"check": 61733,
"check-circle": 61734,
"check-square": 61735,
"chevron-down": 61736,
"chevron-left": 61737,
"chevron-right": 61738,
"chevron-up": 61739,
"chevrons-down": 61740,
"chevrons-left": 61741,
"chevrons-right": 61742,
"chevrons-up": 61743,
"chrome": 61744,
"circle": 61745,
"clipboard": 61746,
"clock": 61747,
"cloud": 61748,
"cloud-drizzle": 61749,
"cloud-lightning": 61750,
"cloud-off": 61751,
"cloud-rain": 61752,
"cloud-snow": 61753,
"codepen": 61754,
"command": 61755,
"compass": 61756,
"copy": 61757,
"corner-down-left": 61758,
"corner-down-right": 61759,
"corner-left-down": 61760,
"corner-left-up": 61761,
"corner-right-down": 61762,
"corner-right-up": 61763,
"corner-up-left": 61764,
"corner-up-right": 61765,
"cpu": 61766,
"credit-card": 61767,
"crop": 61768,
"crosshair": 61769,
"delete": 61770,
"disc": 61771,
"download": 61772,
"download-cloud": 61773,
"droplet": 61774,
"edit": 61775,
"edit-2": 61776,
"edit-3": 61777,
"external-link": 61778,
"eye": 61779,
"eye-off": 61780,
"facebook": 61781,
"fast-forward": 61782,
"feather": 61783,
"file": 61784,
"file-minus": 61785,
"file-plus": 61786,
"file-text": 61787,
"film": 61788,
"filter": 61789,
"flag": 61790,
"folder": 61791,
"github": 61792,
"gitlab": 61793,
"globe": 61794,
"grid": 61795,
"hash": 61796,
"headphones": 61797,
"heart": 61798,
"help-circle": 61799,
"home": 61800,
"image": 61801,
"inbox": 61802,
"info": 61803,
"instagram": 61804,
"italic": 61805,
"layers": 61806,
"layout": 61807,
"life-buoy": 61808,
"link": 61809,
"link-2": 61810,
"list": 61811,
"loader": 61812,
"lock": 61813,
"log-in": 61814,
"log-out": 61815,
"mail": 61816,
"map": 61817,
"map-pin": 61818,
"maximize": 61819,
"maximize-2": 61820,
"menu": 61821,
"message-circle": 61822,
"message-square": 61823,
"mic": 61824,
"mic-off": 61825,
"minimize": 61826,
"minimize-2": 61827,
"minus": 61828,
"minus-circle": 61829,
"minus-square": 61830,
"monitor": 61831,
"moon": 61832,
"more-horizontal": 61833,
"more-vertical": 61834,
"move": 61835,
"music": 61836,
"navigation": 61837,
"navigation-2": 61838,
"octagon": 61839,
"package": 61840,
"paperclip": 61841,
"pause": 61842,
"pause-circle": 61843,
"percent": 61844,
"phone": 61845,
"phone-call": 61846,
"phone-forwarded": 61847,
"phone-incoming": 61848,
"phone-missed": 61849,
"phone-off": 61850,
"phone-outgoing": 61851,
"pie-chart": 61852,
"play": 61853,
"play-circle": 61854,
"plus": 61855,
"plus-circle": 61856,
"plus-square": 61857,
"pocket": 61858,
"power": 61859,
"printer": 61860,
"radio": 61861,
"refresh-ccw": 61862,
"refresh-cw": 61863,
"repeat": 61864,
"rewind": 61865,
"rotate-ccw": 61866,
"rotate-cw": 61867,
"save": 61868,
"scissors": 61869,
"search": 61870,
"server": 61871,
"settings": 61872,
"share": 61873,
"share-2": 61874,
"shield": 61875,
"shopping-cart": 61876,
"shuffle": 61877,
"sidebar": 61878,
"skip-back": 61879,
"skip-forward": 61880,
"slack": 61881,
"slash": 61882,
"sliders": 61883,
"smartphone": 61884,
"speaker": 61885,
"square": 61886,
"star": 61887,
"stop-circle": 61888,
"sun": 61889,
"sunrise": 61890,
"sunset": 61891,
"tablet": 61892,
"tag": 61893,
"target": 61894,
"thermometer": 61895,
"thumbs-down": 61896,
"thumbs-up": 61897,
"toggle-left": 61898,
"toggle-right": 61899,
"trash": 61900,
"trash-2": 61901,
"trending-down": 61902,
"trending-up": 61903,
"triangle": 61904,
"tv": 61905,
"twitter": 61906,
"type": 61907,
"umbrella": 61908,
"underline": 61909,
"unlock": 61910,
"upload": 61911,
"upload-cloud": 61912,
"user": 61913,
"user-check": 61914,
"user-minus": 61915,
"user-plus": 61916,
"user-x": 61917,
"users": 61918,
"video": 61919,
"video-off": 61920,
"voicemail": 61921,
"volume": 61922,
"volume-1": 61923,
"volume-2": 61924,
"volume-x": 61925,
"watch": 61926,
"wifi": 61927,
"wifi-off": 61928,
"wind": 61929,
"x": 61930,
"x-circle": 61931,
"x-square": 61932,
"zap": 61933,
"zoom-in": 61934,
"zoom-out": 61935
}
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -13,6 +13,7 @@
"build-web": "babel ./{,lib}/*.js --out-dir ./dist && cp -R ./glyphmaps ./dist/glyphmaps",
"build-entypo": "mkdir -p tmp/svg && curl https://dl.dropboxusercontent.com/u/4339492/entypo.zip > tmp/entypo.zip && unzip -j tmp/entypo.zip *.svg -x __MACOSX/* -d tmp/svg && fontcustom compile tmp/svg -o tmp -n Entypo -t css -h && node bin/generate-icon tmp/Entypo.css --componentName=Entypo --fontFamily=Entypo --template=templates/separated-icon-set.tpl --glyphmap=glyphmaps/Entypo.json > Entypo.js && cp tmp/Entypo.ttf Fonts && rm -rf {tmp,.fontcustom-manifest.json}",
"build-evilicons": "fontcustom compile node_modules/evil-icons/assets/icons -o tmp -n EvilIcons -t css -h && node bin/generate-icon tmp/EvilIcons.css --prefix=.icon-ei- --componentName=EvilIcons --template=templates/separated-icon-set.tpl --glyphmap=glyphmaps/EvilIcons.json --fontFamily=EvilIcons > EvilIcons.js && cp tmp/EvilIcons.ttf Fonts && rm -rf {tmp,.fontcustom-manifest.json}",
"build-feather": "fontcustom compile node_modules/feather-icons/dist/icons -o tmp -n Feather -t css -h && node bin/generate-icon tmp/Feather.css --prefix=.icon- --componentName=Feather --template=templates/separated-icon-set.tpl --glyphmap=glyphmaps/Feather.json --fontFamily=Feather > Feather.js && cp tmp/Feather.ttf Fonts && rm -rf {tmp,.fontcustom-manifest.json}",
"build-fontawesome": "node bin/generate-icon node_modules/font-awesome/css/font-awesome.css --prefix=.fa- --componentName=FontAwesome --fontFamily=FontAwesome --template=templates/separated-icon-set.tpl --glyphmap=glyphmaps/FontAwesome.json > FontAwesome.js && cp node_modules/font-awesome/fonts/fontawesome-webfont.ttf Fonts/FontAwesome.ttf",
"build-foundation": "node bin/generate-icon bower_components/foundation-icon-fonts/foundation-icons.css --prefix=.fi- --componentName=Foundation --fontFamily=fontcustom --template=templates/separated-icon-set.tpl --glyphmap=glyphmaps/Foundation.json > Foundation.js && cp bower_components/foundation-icon-fonts/foundation-icons.ttf Fonts/Foundation.ttf",
"build-ionicons": "node bin/generate-icon node_modules/ionicons/dist/css/ionicons.css --prefix=.ion- --componentName=Ionicons --fontFamily=Ionicons --template=templates/separated-icon-set.tpl --glyphmap=glyphmaps/Ionicons.json > Ionicons.js && cp node_modules/ionicons/dist/fonts/ionicons.ttf Fonts/Ionicons.ttf",
Expand Down Expand Up @@ -75,6 +76,7 @@
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-react": "^7.1.0",
"evil-icons": "^1.8.0",
"feather-icons": "^3.2.2",
"font-awesome": "^4.6.3",
"ionicons": "^3.0.0",
"material-design-icons": "^3.0.1",
Expand Down

0 comments on commit 53d845c

Please sign in to comment.