Posts

Showing posts from November, 2019

IconFont2Code, my open-source tool in order to view icons in font files and create C# class with the glyph constants

Image
As an app developer, it's impossible not to have the task to display an icon in the app. One of the common ways to display icons , instead of using images or SVGs , is by using font files (.ttf, .otf or .woff). Although font files are usually used to display text with a specific font, but they can also be used to display icons . Instead of containing glyphs with letters , they contain glyphs with icons : There are different types of font technologies but the most common ones today are the TrueType (.ttf), OpenType (.otf) or the WOFF (.woff) font files. The way they store and render the glyphs is using a collection of line and curve commands as well as a collection of hint , which allows them to provide both relatively fast drawing speed and true device independence . The  device independence is a key aspect given the myriad of display sizes and technologies which exist today. Referring to an icon inside of a icon font file  works by knowing the hexadecimal value of