1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use freetype to render fonts.

This commit is contained in:
Bartosz Taudul
2018-08-17 21:40:15 +02:00
parent e6ab7692c8
commit 914a1713e3
8 changed files with 446 additions and 2 deletions
+3
View File
@@ -21,6 +21,7 @@
#include "../../server/TracyWorker.hpp"
#include "../../server/TracyVersion.hpp"
#include "imgui_freetype.h"
#include "Arimo.hpp"
#include "Cousine.hpp"
#include "FontAwesomeSolid.hpp"
@@ -127,6 +128,8 @@ int main( int argc, char** argv )
io.Fonts->AddFontFromMemoryCompressedTTF( tracy::FontAwesomeSolid_compressed_data, tracy::FontAwesomeSolid_compressed_size, 14.0f * dpiScale, &configMerge, rangesIcons );
auto fixedWidth = io.Fonts->AddFontFromMemoryCompressedTTF( tracy::Cousine_compressed_data, tracy::Cousine_compressed_size, 15.0f * dpiScale );
ImGuiFreeType::BuildFontAtlas( io.Fonts, ImGuiFreeType::LightHinting );
ImGui::StyleColorsDark();
auto& style = ImGui::GetStyle();
style.WindowBorderSize = 1.f * dpiScale;