mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Merge font awesome into the default font.
This commit is contained in:
parent
337111f948
commit
3d0b9da592
@ -154,6 +154,7 @@
|
||||
<ClInclude Include="..\..\libs\gl3w\GL\gl3w.h" />
|
||||
<ClInclude Include="..\..\libs\gl3w\GL\glcorearb.h" />
|
||||
<ClInclude Include="..\..\src\Arimo.hpp" />
|
||||
<ClInclude Include="..\..\src\FontAwesomeSolid.hpp" />
|
||||
<ClInclude Include="..\..\src\imgui_impl_glfw_gl3.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -206,6 +206,9 @@
|
||||
<ClInclude Include="..\..\..\imguicolortextedit\TextEditor.h">
|
||||
<Filter>imguicolortextedit</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\FontAwesomeSolid.hpp">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="DebugVis.natvis" />
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "../../server/TracyWorker.hpp"
|
||||
#include "../../server/TracyVersion.hpp"
|
||||
|
||||
|
||||
#include "Arimo.hpp"
|
||||
#include "FontAwesomeSolid.hpp"
|
||||
|
||||
static void glfw_error_callback(int error, const char* description)
|
||||
{
|
||||
@ -97,14 +97,21 @@ int main( int argc, char** argv )
|
||||
ImGui::CreateContext();
|
||||
ImGui_ImplGlfwGL3_Init(window, true);
|
||||
|
||||
static const ImWchar ranges[] = {
|
||||
static const ImWchar rangesBasic[] = {
|
||||
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
||||
0x03BC, 0x03BC, // micro
|
||||
0,
|
||||
};
|
||||
static const ImWchar rangesIcons[] = {
|
||||
0xF071, 0xF071,
|
||||
0
|
||||
};
|
||||
ImFontConfig configMerge;
|
||||
configMerge.MergeMode = true;
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.Fonts->AddFontFromMemoryCompressedTTF( tracy::Arimo_compressed_data, tracy::Arimo_compressed_size, 15.0f * dpiScale, nullptr, ranges );
|
||||
io.Fonts->AddFontFromMemoryCompressedTTF( tracy::Arimo_compressed_data, tracy::Arimo_compressed_size, 15.0f * dpiScale, nullptr, rangesBasic );
|
||||
io.Fonts->AddFontFromMemoryCompressedTTF( tracy::FontAwesomeSolid_compressed_data, tracy::FontAwesomeSolid_compressed_size, 15.0f * dpiScale, &configMerge, rangesIcons );
|
||||
auto fixedWidth = io.Fonts->AddFontDefault();
|
||||
|
||||
ImGui::StyleColorsDark();
|
||||
|
Loading…
Reference in New Issue
Block a user