Get the font files from http://octicons.github.com and copy the octicons-local.ttf
file to the /resources
directory at the root of your project.
my_icon = NSMutableAttributedString.alloc.initWithString("\uf00e")
my_icon.addAttribute(NSFontAttributeName, value: NSFont.fontWithName("github-octicons",size:30), range: NSMakeRange(0, 1))
The string in initWithString
will be the unicode value of the char that represents the icon you want. You can check the unicode value for the icons in the CSS file that comes when you download the font.You can also get the unicode value when you select an icon on octicons.github.com.