From 53bff541e292c5d6cae73881a37bf8f7e4a5fd0a Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 28 Mar 2021 16:04:42 -0700 Subject: Add FontAwesome icon set --- core/src/Entrypoint/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'core/src/Entrypoint/main.cpp') 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 - #include +#include #include #include #include @@ -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(); } -- cgit v1.2.3-70-g09d2