andreinitescu / IconFont2Code

Generate C# class with constant fields for the icons in your font
277 stars 37 forks source link

Can you handle duplicates? #10

Closed sturlath closed 4 years ago

sturlath commented 4 years ago

I was trying out www.nerdfonts.com and it creates about 400 duplicate errors if I take it all. It would be great if the tool could auto post-fix-increment the C# class like

public const string Plus = "\uf067"; public const string Plus_2 = "\uf44d"; public const string Plus_3 = "\uf914";

Or something like that :-)

andreinitescu commented 4 years ago

Could you please attach a font file sample with duplicates please? Ideally, something small would be great, otherwise anything else is fine too.

andreinitescu commented 4 years ago

Oh, do you mean the font file has glyphs with duplicate names? (which is why IconFont2Code generates duplicate C# properties)

andreinitescu commented 4 years ago

Like I said, please attach a font file sample, so I can try think for a fix. Thanks

andreinitescu commented 4 years ago

Should be working now

sturlath commented 4 years ago

Hi sorry was going to send you an example but couldn't get to it until now. Thank you for your update. I just tried it out and it works like a charm :-)

andreinitescu commented 4 years ago

Awesome! Thanks for reporting the issue 👍 Let me know if you find anything else. Thanks