MCPcopy Create free account
hub / github.com/ddiakopoulos/polymer / append_icon_font

Method append_icon_font

libraries/lib-app-base/src/gl-imgui.cpp:53–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52 std::vector<uint8_t> iconFontBuffer;
53 ImFont * imgui_instance::append_icon_font(const std::vector<uint8_t> & buffer)
54 {
55 ImGuiIO & io = ImGui::GetIO();
56 iconFontBuffer = buffer;
57 static const ImWchar icons_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
58 ImFontConfig icons_config;
59 icons_config.MergeMode = true;
60 icons_config.PixelSnapH = true;
61 icons_config.FontDataOwnedByAtlas = false;
62 auto font = io.Fonts->AddFontFromMemoryTTF((void *)iconFontBuffer.data(), (int)iconFontBuffer.size(), 15.f, &icons_config, icons_ranges);
63 IM_ASSERT(font != NULL);
64 return font;
65 }
66
67 imgui_instance::~imgui_instance()
68 {

Callers 1

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected