This class is an open source class and I did some functional optimizations
1, if you do not install font awesome fonts, you may need to go directly under the EXE path to use the corresponding name font.
2, can directly return \ufxxx type font, convenient WinForm button use, otherwise, the original class can only use the picture may affect the mouse scrub effect.
Use procedure
1, in the EXE directory to build the font folder, the two font files are copied in.
2. Main function initialization
Static void Main () { fontawesome.initfontfile (application.startuppath); Application.enablevisualstyles (); Application.setcompatibletextrenderingdefault (false); Application.Run (new Form1 ()); }
3. Set button icon
Private void Setformbuttonicon () { = fontawesome.typestringdict["fa-power-off"]; = Fontawesome.getfontwithsize (+); // new Font ("Fontawesome", +); Buttonexit.forecolor = color.green; }
Effect
Full class
http://download.csdn.net/download/zhaogaojian/10233062
C # using font awesome fonts