ImGuiStyle: Return the font we create

This commit is contained in:
Connor McLaughlin 2021-01-11 00:56:59 +10:00
parent a563f99191
commit 582c77b604
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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