Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create List of Icons #1005

Closed
BFTrick opened this issue May 6, 2013 · 3 comments
Closed

Create List of Icons #1005

BFTrick opened this issue May 6, 2013 · 3 comments

Comments

@BFTrick
Copy link

BFTrick commented May 6, 2013

Hello,

I'm extending the Font Awesome WordPress Plugin and wondering if a master list of all of the icons with their name, category, and version added info can be compiled. That way I can programmatically do cool things with the icons like show my users a small subset of icons for them to choose the icon for the feature box on the front page fo their website; or any number of super awesome things.

If you think this sounds like a good idea any idea on how to accomplish it? It would probably be best to be programming language agnostic so maybe a format like XML or Markdown or something? What are your thoughts? I'm willing to chip in if need be.

@stutteringp0et
Copy link

why not take the values directly from the included less file?

$iconclasses=array();
$faless = file_get_contents('/path/to/font-awesome.less');
preg_match_all('/\.icon-.*?:before\s*?\{\s*?content/',$faless,$matches);
foreach($matches[0] as $match) {
    $match = explode(':',$match);
    $iconclasses[] = preg_replace('/^\./','',$match[0]);
}

This way, you can rely directly on the font-awesome package contents rather than a static list that someone has to maintain.

@davegandy
Copy link
Member

Ask and ye shall receive:
https://github.com/FortAwesome/Font-Awesome/blob/3.1.0-wip/build/icons.yml

The new website generates icon pages from this file. It's not final quite yet, but should be exactly what you're looking for.

@BFTrick
Copy link
Author

BFTrick commented May 6, 2013

You are too full of awesome my friend. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants