diff --git a/src/frontend-common/imgui_styles.cpp b/src/frontend-common/imgui_styles.cpp index bcfefe851..3fd951615 100644 --- a/src/frontend-common/imgui_styles.cpp +++ b/src/frontend-common/imgui_styles.cpp @@ -57,7 +57,7 @@ void ImGui::StyleColorsDarker(ImGuiStyle* dst) #include "font_roboto_regular.inl" -void ImGui::AddRobotoRegularFont(float size /*= 15.0f*/) +ImFont* ImGui::AddRobotoRegularFont(float size /*= 15.0f*/) { static const ImWchar ranges[] = { // Basic Latin + Latin Supplement + Central European diacritics @@ -79,6 +79,6 @@ void ImGui::AddRobotoRegularFont(float size /*= 15.0f*/) 0, }; - ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(s_font_roboto_regular_compressed_data, - s_font_roboto_regular_compressed_size, size, nullptr, ranges); + return ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF( + s_font_roboto_regular_compressed_data, s_font_roboto_regular_compressed_size, size, nullptr, ranges); } diff --git a/src/frontend-common/imgui_styles.h b/src/frontend-common/imgui_styles.h index 85f399444..ab652db88 100644 --- a/src/frontend-common/imgui_styles.h +++ b/src/frontend-common/imgui_styles.h @@ -3,5 +3,5 @@ namespace ImGui { void StyleColorsDarker(ImGuiStyle* dst = nullptr); -void AddRobotoRegularFont(float size = 15.0f); -} +ImFont* AddRobotoRegularFont(float size = 15.0f); +} // namespace ImGui