Added embedded fonts.
parent
4d1990bea8
commit
e8af30d10c
|
@ -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
|
||||
|
|
File diff suppressed because it is too large
Load Diff
16
src/main.cc
16
src/main.cc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue