/IconFont2Code

Generate C# class with constant fields for the icons in your font

Primary LanguageJavaScript

IconFont2Code

This web tool generates a C# class with the Unicode values of the glyph icons in your font file (.ttf/.otf).

It should be an useful tool for any .NET app (WPF/UWP/Xamarin/Xamarin.Forms) which uses icon fonts.

See it live here: https://andreinitescu.github.io/IconFont2Code/

How to use it

Here's an example with one of the fonts in the "Font Awesome" font pack:

Generate nicer C# fields

When the font file has glyphs with generic names or the glyphs have no name, select the CSS file which is usually provided with the icon font, and the tool will generate nice names for your C# fields.

In the video below you can see the Foundation icons font which has glyph name in the form of "UniXXXXX":

(Click the thumbnail below to watch the video)

Thanks to these awesome projects