diff options
author | rtk0c <[email protected]> | 2021-03-28 16:04:42 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-03-28 16:04:42 -0700 |
commit | 53bff541e292c5d6cae73881a37bf8f7e4a5fd0a (patch) | |
tree | beaee0ec4bd12179a4a6f85afcbc3ced2b855f40 /core/src/Entrypoint/main.cpp | |
parent | a7e5e42a188f9e6ab13706a15e6b50f36f0e00e8 (diff) |
Add FontAwesome icon set
Diffstat (limited to 'core/src/Entrypoint/main.cpp')
-rw-r--r-- | core/src/Entrypoint/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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(); } |