- Icon header provided by IconFontCppHeaders
- Font binary generated using ImGui binary_to_compressed_c
- Built using ImGui DirectX11 Example
- Download from webfonts FontAwesome .tff file
- Download (or generate) updated headers from IconFontCppHeaders
- Convert .tff file to byte array
- Replace template example files
- Download binary_to_compressed_c and compile following file comments (or use precompiled version from release)
- Run generated executable with fonts in same folder that executable using following parameters:
binary_to_compressed_c.exe fa-solid-900.ttf FontAwesome > fa.h
- Finished
- You can use brands icons following the same steps but using Brands fonts
- To use multiple icon sizes you'll need add create multiple versions in memory like:
io.Fonts->AddFontFromMemoryCompressedTTF(FA_compressed_data, FA_compressed_size, 12.0f, &icons_config, icons_ranges);
io.Fonts->AddFontFromMemoryCompressedTTF(FA_compressed_data, FA_compressed_size, 20.0f, &icons_config, icons_ranges);
- If a quotation mark is displayed instead of the icon, probably the Icon header and Font Awesome version are not the same
I had some issues with performance degradation when using custom icons in a extreme low-end hardware (in a application with a HUGE iterations per second)