summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/CMakeLists.txt1
-rw-r--r--core/fonts/FontAwesome5-Solid.otfbin0 -> 591768 bytes
-rw-r--r--core/src/Entrypoint/main.cpp9
3 files changed, 9 insertions, 1 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index a8386b2..37fccd3 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -102,6 +102,7 @@ function(add_executable_variant TARGET_NAME)
)
target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src
+ ${CMAKE_SOURCE_DIR}/3rdparty/iconfontheaders
${CMAKE_SOURCE_DIR}/3rdparty/imgui
${CMAKE_SOURCE_DIR}/3rdparty/imnodes
)
diff --git a/core/fonts/FontAwesome5-Solid.otf b/core/fonts/FontAwesome5-Solid.otf
new file mode 100644
index 0000000..8fb28d5
--- /dev/null
+++ b/core/fonts/FontAwesome5-Solid.otf
Binary files differ
diff --git a/core/src/Entrypoint/main.cpp b/core/src/Entrypoint/main.cpp
index b82214d..a8c988a 100644
--- a/core/src/Entrypoint/main.cpp
+++ b/core/src/Entrypoint/main.cpp
@@ -7,8 +7,8 @@
#include "Entrypoint/Vulkan.hpp"
#include <glad/glad.h>
-
#include <GLFW/glfw3.h>
+#include <IconsFontAwesome.h>
#include <imgui.h>
#include <argparse/argparse.hpp>
#include <iostream>
@@ -124,11 +124,18 @@ int main(int argc, char* argv[]) {
auto backend = CreateBackend(backendOption);
auto& io = ImGui::GetIO();
+ // Includes latin alphabet, although for some reason smaller than if rendered using 18 point NotoSans regular
io.Fonts->AddFontFromFileTTF("fonts/NotoSansSC-Regular.otf", 18, nullptr, io.Fonts->GetGlyphRangesChineseSimplifiedCommon());
+ ImWchar kIconRanges[] = { ICON_MIN_FA, ICON_MAX_FA };
+ ImFontConfig config;
+ config.MergeMode = true;
+ io.Fonts->AddFontFromFileTTF("fonts/FontAwesome5-Solid.otf", 14, &config, kIconRanges);
+
auto window = backend->GetWindow();
while (!glfwWindowShouldClose(window)) {
backend->BeginFrame();
+ ImGui::ShowDemoWindow();
backend->EndFrame();
}