Added embedded fonts.

RefactorUnifiedBlendTreeStateMachineHandling
Martin Felis 2024-04-30 17:49:19 +02:00
parent 4d1990bea8
commit e8af30d10c
3 changed files with 10457 additions and 1 deletions

View File

@ -78,6 +78,7 @@ target_include_directories(
target_sources(AnimTestbed PRIVATE
src/main.cc
src/embedded_fonts.h
src/SkinnedMeshRenderer.cc
src/AnimGraph/AnimGraphEditor.cc
src/AnimGraph/AnimGraphEditor.h

10441
src/embedded_fonts.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,7 @@
#include "SkinnedMesh.h"
#include "SkinnedMeshRenderer.h"
#include "SkinnedMeshResource.h"
#include "embedded_fonts.h"
#include "src/AnimGraph/AnimGraphEditor.h"
const int Width = 1024;
@ -573,7 +574,20 @@ int main() {
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
io.IniFilename = "ATPImgui.ini";
io.Fonts->AddFontDefault();
//io.Fonts->AddFontDefault();
ImFontConfig font_config;
font_config.OversampleH = 4;
font_config.OversampleV = 4;
font_config.GlyphExtraSpacing.x = 1.0f;
io.Fonts->AddFontFromMemoryCompressedTTF(
// roboto_medium_ttf_compressed_data,
// roboto_medium_ttf_compressed_size,
droid_sans_ttf_compressed_data,
droid_sans_ttf_compressed_size,
14,
&font_config);
io.KeyMap[ImGuiKey_Tab] = GLFW_KEY_TAB;
io.KeyMap[ImGuiKey_LeftArrow] = GLFW_KEY_LEFT;
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;