Skip to content

Commit

Permalink
Additional information
Browse files Browse the repository at this point in the history
  • Loading branch information
caiocinel authored Dec 22, 2023
1 parent 2c571bc commit 65d661a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

## ImGui + FontAwesome Example

- Icon header provided by [IconFontCppHeaders](https://github.com/juliettef/IconFontCppHeaders)
Expand All @@ -15,6 +16,16 @@
2. 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```
3. Finished

### Additional Information
1. You can use brands icons following the same steps but using Brands fonts
2. 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);
```
3. If a quotation mark is displayed instead of the icon, probably the Icon header and Font Awesome version are not the same


#### Performance Implications:
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)

Expand Down

0 comments on commit 65d661a

Please sign in to comment.