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

How to Ingest Outside Icon Libraries #48

Open
amkuchta opened this issue May 23, 2017 · 7 comments
Open

How to Ingest Outside Icon Libraries #48

amkuchta opened this issue May 23, 2017 · 7 comments

Comments

@amkuchta
Copy link

As the FA5 release date rapidly approaches (30 June, last I looked), I am going to be interested in incorporating my pro license into some of my apps. However, I know that we cannot just give away FA5 Pro Icons.

The only solution I see is for me to generate my own version of MA.M.IP, but I am unsure as to how to incorporate the FA5 Pro icons (or any icons, for that matter) into it. Can a quick-guide be generated? Or, as a separate concept, could a private repo be created that has FA5 icons incorporated, and we just control access to it? (Not sure how we can ensure access is limited to only those who have purchased the Pro pack...)

I'm also open to suggestions on any other ideas.

@amkuchta
Copy link
Author

amkuchta commented Aug 15, 2017

Just found out that Symbolicons is also doing a Pro version... which means that this issue (feature request?) should apply to that as well.

I think the only way to do it is to fork the repo and incorporate what I want myself, so maybe the larger issue at hand is creating a user guide to give some insight as to how to do that. Thoughts, @punker76?

Sent from my Htc HTC6535LVW using FastHub

@amkuchta amkuchta changed the title FontAwesome 5 Pro How to Ingest Outside Icon Libraries Jan 26, 2018
@amkuchta
Copy link
Author

@punker76 I've updated the title of this since it extends beyond just FA5 now - Symbolicons has a pro license, and this could be used to satisfy #67 as well. Can we update the Wiki to walk people through how to generate an IconPack from an external library in their own (forked) repo? That would allow:

  1. Users to be able to utilize "Pro" licenses, and
  2. Guidance on how others can create PRs for non-Pro icon libraries that may be beneficial to the community (this takes some work off of you)

Obviously, by "we", I mean "you" 😆 😆 😆

@amkuchta
Copy link
Author

amkuchta commented Oct 5, 2018

@punker76 can you package the script you use to parse SVG files in the next release?

@amkuchta
Copy link
Author

amkuchta commented Aug 16, 2019

For anyone who needs it, I created a Python file that generates a custom DataFactory for PackIconFontAwesome. I didn't include any error handling because I am lazy, and values are hard-coded (you'll need to swap in the location of your FontAwesome folder).

Also, the script assumes that the directory follows the structure that FontAwesome ships in - specifically that there is one master directory (e.g. svgs) with sub directories for the various icon types (brands, regular, etc.).

Finally, I specifically created this with FontAwesome icons in mind, but it can be easily adapted for other icon types.

The file can be found at this gist - hope it helps!

@punker76 I'll leave it up to you whether or not to close this - technically, this is just a workaround, but it does solve my issue, so....

@amkuchta
Copy link
Author

I realized that I forgot PackIconFontAwesomeKind...

... I'm reworking the script to operate off the the icons.json metadata file to accomplish the full spectrum. Everyone ignore the above comment lol.

@punker76, this definitely isn't closed yet.

@amkuchta
Copy link
Author

New update...

Got both files to generate correctly, but now there is an issue with the number of items in a single class. I'll be working to break out the PackIconFontAwesomeKind into several types this evening:

  • PackIconFontAwesomeBrandsKind
  • PackIconFontAwesomeLightKind
  • PackIconFontAwesomeRegularKind
  • PackIconFontAwesomeSolidKind

I may also tackle DuoTone at a later date, but I have no pressing requirement for it. Updates I make to my script can be tracked via the gist link I posted above.

@amkuchta
Copy link
Author

Gist is updated with the latest version. A few caveats:

  • Some names changed, as each icon type is now its own kind. Items like DrawPolygonSolid are now PackIconFontAwesomeSolid.DrawPolygon. Obviously, this is breaking
  • There are a ton of other refactors that have to be done to make this work. Basically, search for PackIconFontAwesome everywhere and replace it with PackIconFontAwesome[Type]. Same goes for PackIconFontAwesomeKind => PackAwesomeFontAwesome[Type]Kind
  • Because of limitations in C#, you cannot build all of the Types at once. The next step (on my end) would be to create separate projects for each Type. Right now, I really only need light, so this is not a pressing matter for me

@punker76, if I were to create a PR that breaks the FA icon pack into multiple types (brands, light, regular, and solid) for the official release, how much traction would that get on your end? It would make life easier for others who want to ingest the full Pro version in their own repos, and it would allow for better expansion of the FA icon pack as it continues to grow down the line.

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

No branches or pull requests

1 participant