bgfx/3rdparty/iconfontheaders
Branimir Karadžić 8ee075eecf Updated IconFontCppHeaders. 2017-02-23 22:22:12 -08:00
..
.gitignore Added icon font headers. 2016-02-10 22:37:09 -08:00
GenerateIconFontCppHeaders.py Updated IconFontCppHeaders. 2017-02-23 21:08:56 -08:00
LICENSE Added icon font headers. 2016-02-10 22:37:09 -08:00
README.md Updated IconFontCppHeaders. 2017-02-23 22:22:12 -08:00
icons_font_awesome.h Updated IconFontCppHeaders. 2017-02-23 21:08:56 -08:00
icons_kenney.h Updated IconFontCppHeaders. 2017-02-23 21:08:56 -08:00
icons_material_design.h Updated IconFontCppHeaders. 2017-02-23 21:08:56 -08:00

README.md

IconFontCppHeaders

https://github.com/juliettef/IconFontCppHeaders

C++11, C89 and None headers for icon fonts Font Awesome, Google Material Design icons and Kenney game icons.

A set of header files for using icon fonts in C, C++ and None, along with the python generator used to create the files.

Each header contains defines for one font, with each icon code point defined as ICON_*, along with the min and max code points for font loading purposes.

Fonts

Example Code

Using dear imgui as an example UI library:

#include "IconsFontAwesome.h"

ImGuiIO& io = ImGui::GetIO();
 io.Fonts->AddFontDefault();
 
 // merge in icons from Font Awesome
static const ImWchar icons_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
ImFontConfig icons_config; icons_config.MergeMode = true; icons_config.PixelSnapH = true;
io.Fonts->AddFontFromFileTTF( fontFile.c_str(), 16.0f, &icons_config, icons_ranges);

// in an imgui window somewhere...
ImGui::Text( ICON_FA_FILE "  File" ); // use string literal concatenation, ouputs a file icon and File as a string.

Projects using the font icon header files

bgfx - Cross-platform rendering library

Avoyd - Game

The Edit Tool UI uses dear imgui with Font Awesome fonts.

Avoyd Edit Tool with Font Awesome fonts

Credits

Development - Juliette Foucaut - @juliettef
Requirements - Doug Binks - @dougbinks
None language format definition and refactoring - Leonard Ritter - @paniq