Hacker News new | ask | show | jobs
by FraKtus 2286 days ago
I used them in applications developed in C++.

The toolkit is Dear ImGui and I load the TTF font with the simple API AddFontFromMemoryCompressedBase85TTF.

Then when I need a button with an Icon I just use it like this: if (ImGui::Button(ICON_FIRST, button_sz)) { }

The trick in C++ was to define the ICON_FIST in this way:

#define ICON_FIRST u8"\uea21"

I can then rescale my interface by simply changing the font size and the icons keep all nice and clean.