alexdrone/ios-fontawesome

Font Awesome 3.1.1 icons

wilg opened this issue · 3 comments

wilg commented
Font Awesome 3.1.1 icons

Or give instructions for doing this ourselves, I'll save you the trouble.

+1 for the 3.1.1 icons request

For now, if you want to use icons from FontAwesome 3.1.1, here's how you can do it:

Go here: https://github.com/leberwurstsaft/FontAwesome-for-iOS, and download the "fixed" FontAwesome.ttf and add it to your project.

Now, in places in your code that look like this:

button.titleLabel.font = [UIFont fontWithName:kFontAwesomeFamilyName size:20];
[button setTitle:[NSString fontAwesomeIconStringForEnum:FAIconLink] forState:UIControlStateNormal];

Change them to this:

button.titleLabel.font = [UIFont fontWithName:kFontAwesomeFamilyName size:20];
[button setTitle:[NSString stringWithUTF8String:"\uF127"] forState:UIControlStateNormal];

Replace F127 with the Unicode character code for the new icon you want to use. You can find those codes here: http://fortawesome.github.io/Font-Awesome/icons/#new. Click the icon you want, and the code will be listed right beside it.

Note: you only have to use the Unicode character code for new icons. The old icons will still work the same.

I'll try to add support for 3.1.1 icons and submit a pull request. It may be a little while before I can get to it.