ImGuiStyle: Return the font we create
This commit is contained in:
parent
a563f99191
commit
582c77b604
|
@ -57,7 +57,7 @@ void ImGui::StyleColorsDarker(ImGuiStyle* dst)
|
||||||
|
|
||||||
#include "font_roboto_regular.inl"
|
#include "font_roboto_regular.inl"
|
||||||
|
|
||||||
void ImGui::AddRobotoRegularFont(float size /*= 15.0f*/)
|
ImFont* ImGui::AddRobotoRegularFont(float size /*= 15.0f*/)
|
||||||
{
|
{
|
||||||
static const ImWchar ranges[] = {
|
static const ImWchar ranges[] = {
|
||||||
// Basic Latin + Latin Supplement + Central European diacritics
|
// Basic Latin + Latin Supplement + Central European diacritics
|
||||||
|
@ -79,6 +79,6 @@ void ImGui::AddRobotoRegularFont(float size /*= 15.0f*/)
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(s_font_roboto_regular_compressed_data,
|
return ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(
|
||||||
s_font_roboto_regular_compressed_size, size, nullptr, ranges);
|
s_font_roboto_regular_compressed_data, s_font_roboto_regular_compressed_size, size, nullptr, ranges);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
|
|
||||||
namespace ImGui {
|
namespace ImGui {
|
||||||
void StyleColorsDarker(ImGuiStyle* dst = nullptr);
|
void StyleColorsDarker(ImGuiStyle* dst = nullptr);
|
||||||
void AddRobotoRegularFont(float size = 15.0f);
|
ImFont* AddRobotoRegularFont(float size = 15.0f);
|
||||||
}
|
} // namespace ImGui
|
||||||
|
|
Loading…
Reference in New Issue