mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 13:13:53 +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\gl3w.h" />
|
||||||
<ClInclude Include="..\..\libs\gl3w\GL\glcorearb.h" />
|
<ClInclude Include="..\..\libs\gl3w\GL\glcorearb.h" />
|
||||||
<ClInclude Include="..\..\src\Arimo.hpp" />
|
<ClInclude Include="..\..\src\Arimo.hpp" />
|
||||||
|
<ClInclude Include="..\..\src\FontAwesomeSolid.hpp" />
|
||||||
<ClInclude Include="..\..\src\imgui_impl_glfw_gl3.h" />
|
<ClInclude Include="..\..\src\imgui_impl_glfw_gl3.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -206,6 +206,9 @@
|
|||||||
<ClInclude Include="..\..\..\imguicolortextedit\TextEditor.h">
|
<ClInclude Include="..\..\..\imguicolortextedit\TextEditor.h">
|
||||||
<Filter>imguicolortextedit</Filter>
|
<Filter>imguicolortextedit</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\FontAwesomeSolid.hpp">
|
||||||
|
<Filter>src</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Natvis Include="DebugVis.natvis" />
|
<Natvis Include="DebugVis.natvis" />
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
#include "../../server/TracyWorker.hpp"
|
#include "../../server/TracyWorker.hpp"
|
||||||
#include "../../server/TracyVersion.hpp"
|
#include "../../server/TracyVersion.hpp"
|
||||||
|
|
||||||
|
|
||||||
#include "Arimo.hpp"
|
#include "Arimo.hpp"
|
||||||
|
#include "FontAwesomeSolid.hpp"
|
||||||
|
|
||||||
static void glfw_error_callback(int error, const char* description)
|
static void glfw_error_callback(int error, const char* description)
|
||||||
{
|
{
|
||||||
@ -97,14 +97,21 @@ int main( int argc, char** argv )
|
|||||||
ImGui::CreateContext();
|
ImGui::CreateContext();
|
||||||
ImGui_ImplGlfwGL3_Init(window, true);
|
ImGui_ImplGlfwGL3_Init(window, true);
|
||||||
|
|
||||||
static const ImWchar ranges[] = {
|
static const ImWchar rangesBasic[] = {
|
||||||
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
0x0020, 0x00FF, // Basic Latin + Latin Supplement
|
||||||
0x03BC, 0x03BC, // micro
|
0x03BC, 0x03BC, // micro
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
static const ImWchar rangesIcons[] = {
|
||||||
|
0xF071, 0xF071,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
ImFontConfig configMerge;
|
||||||
|
configMerge.MergeMode = true;
|
||||||
|
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
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();
|
auto fixedWidth = io.Fonts->AddFontDefault();
|
||||||
|
|
||||||
ImGui::StyleColorsDark();
|
ImGui::StyleColorsDark();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user