{"id":13696130,"url":"https://github.com/ElfSundae/IconFontKit","last_synced_at":"2025-05-03T14:31:01.269Z","repository":{"id":56915298,"uuid":"51847340","full_name":"ElfSundae/IconFontKit","owner":"ElfSundae","description":"Icon fonts toolkit for iOS.","archived":false,"fork":false,"pushed_at":"2016-12-29T03:43:51.000Z","size":3289,"stargazers_count":32,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T00:37:09.790Z","etag":null,"topics":["app","custom-fonts","icon-font","icon-pack","ios"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ElfSundae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-16T15:41:28.000Z","updated_at":"2024-06-06T09:35:23.000Z","dependencies_parsed_at":"2022-08-21T03:50:37.612Z","dependency_job_id":null,"html_url":"https://github.com/ElfSundae/IconFontKit","commit_stats":null,"previous_names":["elfsundae/iconfontskit"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElfSundae%2FIconFontKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElfSundae%2FIconFontKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElfSundae%2FIconFontKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElfSundae%2FIconFontKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElfSundae","download_url":"https://codeload.github.com/ElfSundae/IconFontKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252203166,"owners_count":21710901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app","custom-fonts","icon-font","icon-pack","ios"],"created_at":"2024-08-02T18:00:36.544Z","updated_at":"2025-05-03T14:30:56.901Z","avatar_url":"https://github.com/ElfSundae.png","language":"Objective-C","funding_links":[],"categories":["UI Frameworks"],"sub_categories":[],"readme":"# IconFontKit\n\n[![Pod Version](http://img.shields.io/cocoapods/v/IconFontKit.svg)](http://cocoadocs.org/docsets/IconFontKit)\n\nIconFontKit provides a convenient toolkit to use icon fonts for iOS development.\n\n\u003c!-- MarkdownTOC --\u003e\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Using Custom Icon Fonts](#using-custom-icon-fonts)\n- [Built-in Icon Packs](#built-in-icon-packs)\n- [Credits](#credits)\n- [License](#license)\n\n\u003c!-- /MarkdownTOC --\u003e\n\n[![Sample](https://raw.githubusercontent.com/ElfSundae/IconFontKit/master/screenshots/sample.png?3)](https://raw.githubusercontent.com/ElfSundae/IconFontKit/master/screenshots/sample.png)\n[![Explorer](https://raw.githubusercontent.com/ElfSundae/IconFontKit/master/screenshots/explorer.png?3)](https://raw.githubusercontent.com/ElfSundae/IconFontKit/master/screenshots/explorer.png)\n[![Selector](https://raw.githubusercontent.com/ElfSundae/IconFontKit/master/screenshots/selector.png?3)](https://raw.githubusercontent.com/ElfSundae/IconFontKit/master/screenshots/selector.png)\n\n## Installation\n\n- `pod 'IconFontKit/Core'` to install only the `IFIcon` abstract class.\n- `pod 'IconFontKit'` to install [all icon packs](#built-in-icon-packs).\n- `pod 'IconFontKit/{Font Identifier}'` to install certain of icon packs, e.g. `pod 'IconFontKit/FontAwesome'`.\n\n## Usage\n\n- An icon can be created by three ways: **code** like `@\"\\uf179\"`, **type** like `IFFAApple`, **identifier** like `@\"fa-apple\"`.  \n  The **code** and **type** way are ***recommended***.\n\n    ```objc\n    IFFontAwesome *faIcon = [IFFontAwesome iconWithCode:@\"\\uf17b\" fontSize:20.0];\n    IFIonicons *ionIcon = [IFFontAwesome iconWithType:IFIIWifi fontSize:20.0];\n    IFOcticons *octIcon = [IFOcticons iconWithIdentifier:@\"octicon-gift\" fontSize:20.0];\n    ```\n\n- `IFIcon` are backend with `NSAttributedString`, and there are several methods for accessing attributes, like:\n\n    ```objc\n    - (NSDictionary *)attributes;\n    - (void)addAttribute:(NSString *)name value:(id)value;\n    - (void)removeAttribute:(NSString *)name;\n    - (void)setAttributes:(NSDictionary *)attributes;\n    ```\n\n- You may create an icon image using `-[IFxxxIcon imageWithSize:]` or `+[IFxxxIcon imageWithType:color:...]` etc.\n\n    ```objc\n    UIImage *image = [IFFontAwesome imageWithType:IFOIArrowRight color:nil imageSize:CGSizeMake(30, 30)];\n    ```\n\n- Use `+[IFxxxIcon fontWithSize:]` to get an icon font instance of `UIFont` type.\n\n- `[UIImage if_imageWithStackedIcons:imageSize:]` can stack multi-icons to one image.\n\n    ```objc\n    /**\n     * Draws the IFIcons on an image.\n     * These icons will be centered horizontally and vertically by default.\n     * You can set the `drawingPositionAdjustment` property to adjust drawing offset for each icon.\n     *\n     * @param icons The icons to be drawn. The first icon will be drawn on the bottom and the last icon will be drawn on the top.\n     * @param imageSize Height and width for the generated image.\n     *\n     * @return An image with the icons.\n     */\n    + (UIImage *)if_imageWithStackedIcons:(NSArray \u003cIFIcon *\u003e*)icons imageSize:(CGSize)imageSize;\n    ```\n\n    For example:\n\n    ```objc\n    IFFontAwesome *container = [IFFontAwesome iconWithType:IFFASquareO fontSize:100.0 color:[UIColor colorWithWhite:0.88 alpha:1.0]];\n    container.drawingPositionAdjustment = UIOffsetMake(0, 4);\n    IFFontAwesome *forbidden = [IFFontAwesome iconWithType:IFFABan fontSize:70.0 color:[[UIColor redColor] colorWithAlphaComponent:0.6]];\n    IFFontAwesome *usbIcon = [IFFontAwesome iconWithType:IFFAUsb fontSize:50];\n    \n    UIImage *stackedImage = [UIImage if_imageWithStackedIcons:@[container, usbIcon, forbidden] imageSize:CGSizeMake(100, 100)];\n    ```\n\n## Using Custom Icon Fonts\n\n- To use your own icon fonts, just subclass `IFIcon` and implement `+ (NSURL *)fontFileURL` method.\n- If the font name is not the same as the filename of `fontFileURL`, you need to implement `+ (NSString *)fontName` method as well.\n- If you want to use **identifier** way to create icons, you need to implement `+ (NSDictionary *)allIcons` method as well.\n- Icon types of your custom fonts are the icon's unicode hexadecimal value. e.g. icon code `\\uf100`'s type is `0xf100`.\n- _FYI_: You can generate icon fonts using [IcoMoon app](https://icomoon.io/app), [Fontello](http://fontello.com), [Fontastic](http://fontastic.me) or other awesome services.\n- See \"IconFontKitExample/MyFontIcons\" for demo.\n\n    ```objc\n    // MyFontIcons.h\n   \n    #import \u003cIconFontKit/IFIcon.h\u003e\n   \n    typedef NS_ENUM(IFIconType, MyFontIconsType) {\n        MFFacebookSquared   = 0xa100,\n        MFChat              = 0xa101,\n        MFEmoHappy          = 0xa102,\n        MFThumbsUp          = 0xa103,\n        MFThumbsUpAlt       = 0xa104,\n        MFLinkExt           = 0xa105,\n        MFVolumeUp          = 0xa106,\n        MFCogAlt            = 0xa107,\n        MFCode              = 0xa108,\n    };\n   \n    @interface MyFontIcons : IFIcon\n    @end\n    ```\n\n    ```objc\n    // MyFontIcons.m\n   \n    #import \"MyFontIcons.h\"\n   \n    @implementation MyFontIcons\n   \n    + (NSURL *)fontFileURL {\n        return [[[NSBundle mainBundle] resourceURL] URLByAppendingPathComponent:@\"myfonticons.ttf\"];\n    }\n   \n    // Optional becase the font name is the same as the filename of font.\n    //+ (NSString *)fontName {\n    //    return @\"myfonticons\";\n    //}\n   \n    + (NSDictionary *)allIcons {\n        return @{\n                 @\"facebook-squared\":  @\"\\ua100\",\n                 @\"chat\":              @\"\\ua101\",\n                 @\"emo-happy\":         @\"\\ua102\",\n                 @\"thumbs-up\":         @\"\\ua103\",\n                 @\"thumbs-up-alt\":     @\"\\ua104\",\n                 @\"link-ext\":          @\"\\ua105\",\n                 @\"volume-up\":         @\"\\ua106\",\n                 @\"cog-alt\":           @\"\\ua107\",\n                 @\"code\":              @\"\\ua108\",\n                 };\n    }\n    @end\n    ```\n\n## Built-in Icon Packs\n\n| Font Identifier | Version | Icons Number | Font Size | License | Description |\n|---|---|---|---|---|---|\n| [FontAwesome](http://fontawesome.io)| 4.7.0 | [675](http://fontawesome.io/icons) | 135 KB | [SIL OFL 1.1](http://fontawesome.io/license) | Font Awesome |\n| [Octicons](https://octicons.github.com)| 4.3.0 | [172](https://octicons.github.com) | 45 KB | [SIL OFL 1.1](https://github.com/github/octicons/blob/master/LICENSE.txt) | GitHub's icons |\n| [FoundationIcons](http://zurb.com/playground/foundation-icon-fonts-3)| 3.0 | [283](http://zurb.com/playground/foundation-icon-fonts-3#allicons) | 57 KB | ? | Foundation Icon Fonts 3 |\n| [Ionicons](http://ionicons.com)| 2.0.1 | [733](http://ionicons.com) | 189 KB | [MIT](https://github.com/driftyco/ionicons/blob/master/LICENSE) | The premium icon font for Ionic Framework. |\n| [MaterialDesignIcons](https://materialdesignicons.com) | 1.6.50 | [1650](https://materialdesignicons.com) | 236 KB | [SIL OFL 1.1](https://github.com/Templarian/MaterialDesign/blob/master/license.txt) | Material Design Icons |\n| [ElusiveIcons](http://elusiveicons.com) | 2.0.0 | [304](http://elusiveicons.com/icons) | 80 KB | [SIL OFL 1.1](http://elusiveicons.com/license) | Elusive Icons |\n| [MaterialIcons](https://google.github.io/material-design-icons/) | 2.2.3 | [932](https://design.google.com/icons/) | 128 KB | [CC-BY 4.0](https://github.com/google/material-design-icons/blob/master/LICENSE) | Made by Google for Material design. |\n| [ZocialButtons](http://zocial.smcllns.com) | 1.2.0 | [102](http://zocial.smcllns.com/sample.html) | 26 KB | [MIT](https://github.com/smcllns/css-social-buttons#license) | Social buttons |\n| [Typicons](http://www.typicons.com) | 2.0.7 | [336](http://www.typicons.com) | 100 KB | [SIL OFL 1.1](https://github.com/stephenhutchings/typicons.font/blob/master/src/font/LICENCE.md) ||\n| [OpenIconic](https://useiconic.com/open/) | 1.1.1 | [223](https://useiconic.com/open/) | 28 KB | [SIL OFL 1.1](https://github.com/iconic/open-iconic/blob/master/FONT-LICENSE) | The open source sibling of [Iconic](https://useiconic.com). |\n| [MetrizeIcons](http://www.alessioatzeni.com/metrize-icons) | 1.0 | 300 | 63 KB | [Free to use](http://www.alessioatzeni.com/metrize-icons) | Metro-Style Icons |\n| [Meteocons](http://www.alessioatzeni.com/meteocons) | 1.0 | 47 | 18 KB | [Free to use](http://www.alessioatzeni.com/meteocons) | A set of weather icons |\n| [MFGLabsIconset](http://mfglabs.github.io/mfglabs-iconset) | 1.0 | [186](http://mfglabs.github.io/mfglabs-iconset/) | 56 KB | [SIL OFL 1.1](https://github.com/MfgLabs/mfglabs-iconset/blob/master/licenses.txt) | MFG Labs iconset |\n| [LineariconsFree](https://linearicons.com/free) | 1.0.0 | [170](https://linearicons.com/free) | 56 KB | [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) | Linearicons Free Version |\n| [IcoMoonFree](https://icomoon.io/#preview-free) | 1.0.0 | [491](https://icomoon.io/#preview-free) | 95 KB | [CC BY 4.0 or GPL](https://github.com/Keyamoon/IcoMoon-Free/blob/master/License.txt) | IcoMoon Free Pack |\n| [HawconsFilled](http://hawcons.com) | 1.0 | [517](http://hawcons.com/preview/) | 107 KB | [Free to use](http://hawcons.com/faq/) | Hawcons filled style, includes icons of Documents, Sports, Weather, Emoji, Gestures, Filetypes, etc. |\n| [HawconsStroke](http://hawcons.com) | 1.0 | [518](http://hawcons.com/preview/) | 138 KB | [Free to use](http://hawcons.com/faq/) | Hawcons stroke style, includes icons of Documents, Sports, Weather, Emoji, Gestures, Filetypes, etc. |\n| [Dashicons](https://developer.wordpress.org/resource/dashicons/) | 3.8 | [234](https://developer.wordpress.org/resource/dashicons/) | 42 KB | [GPLv2](https://github.com/WordPress/dashicons) | Dashicons is the official icon font of the WordPress admin. |\n| [Linea](http://www.linea.io) | 1.0 | [716](http://www.linea.io) | 125 KB | [CCBY](http://creativecommons.org/licenses/by/4.0/) | A free outline iconset designed by Dario Ferrando. |\n| [Entypo](http://www.entypo.com) | 1.0 | [411](http://www.entypo.com) | 76 KB | [CC BY-SA 4.0](http://www.entypo.com/faq.php) | Entypo+ is the third version of a free suite of premium quality pictograms. |\n| [ThemifyIcons](http://themify.me/themify-icons) | 1.0 | [352](http://themify.me/themify-icons) | 79 KB | [Free to use](http://themify.me/themify-icons) | Handcrafted icons that draw inspiration from Apple iOS 7. |\n| [StreamlineFree](http://streamlineicons.com/free-icons.html) | v2 | [100](http://www.streamlineicons.com/free-icons.html) | 38 KB | [License](http://streamlineicons.com/license.html) | Streamline Free Pack, free iOS 8 vector icons |\n| [Stroke7Icons](http://themes-pixeden.com/font-demos/7-stroke/index.html) | 1.2 | [202](http://themes-pixeden.com/font-demos/7-stroke/index.html) | 58 KB | Free to use | A series of iOS 7 inspired thin stroke icons from [Pixeden](http://www.pixeden.com) |\n| [Devicons](https://github.com/vorillaz/devicons) | 1.8.0 | [171](http://vorillaz.github.io/devicons/#/cheat) | 147 KB | MIT | An iconic font for developers. |\n| [LigatureSymbols](http://kudakurage.com/ligature_symbols/) | 2.11 | [239](http://kudakurage.com/ligature_symbols/) | 84 KB | SIL OFL 1.1 | Ligature Symbols by Kazuyuki Motoyama |\n| [Dripicons](http://demo.amitjakhu.com/dripicons/) | 1.0 | [95](http://demo.amitjakhu.com/dripicons/) | 21 KB | Free to use | A completely free, vector line-icon font by [Amit Jakhu](http://amitjakhu.com). |\n| [OpenWebIcons](http://pfefferle.github.io/openwebicons) | 1.4.0 | [97](http://pfefferle.github.io/openwebicons/icons/) | 40 KB | [SIL OFL 1.1](https://github.com/pfefferle/openwebicons/blob/master/License.txt) | OpenWeb Icons |\n| [Genericons](http://genericons.com) | 3.4.1 | [147](http://genericons.com) | 22 KB | GPLv2 | Designed to be clean and simple keeping with a generic aesthetic. |\n| [MapIcons](http://map-icons.com) | 3.0.0 | [175](http://map-icons.com/#icons) | 48 KB | [SIL OFL 1.1](https://github.com/scottdejonge/map-icons#license) | An icon font for use with Google Maps. |\n| [WeatherIcons](http://erikflowers.github.io/weather-icons) | 2.0.10 | [219](http://erikflowers.github.io/weather-icons) | 100 KB | [SIL OFL 1.1](https://github.com/erikflowers/weather-icons#licensing) | weather, maritime, and meteorological based icons |\n| [EvilIcons](http://evil-icons.io) | 1.8.0  | [70](http://evil-icons.io) | 15 KB | [MIT](https://github.com/outpunk/evil-icons/blob/master/LICENSE.txt) | Simple and clean SVG icon pack with the code to support Rails, Sprockets, Node.js, Gulp, Grunt and CDN. |\n\n## Credits\n\nIconFontKit is inspired to [FontAwesomeKit](https://github.com/PrideChung/FontAwesomeKit).\n\n## License\n\nIconFontKit is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n\n**NOTICE:** each icon font has it's own license agreement.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElfSundae%2FIconFontKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FElfSundae%2FIconFontKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElfSundae%2FIconFontKit/lists"}