From fcb0a2a46a7b5e84c29581756f97e258f904bc4f Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Mon, 17 Feb 2020 21:09:43 +0100 Subject: [PATCH] Load UI overla font from asset path Refs #627 --- base/VulkanUIOverlay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/VulkanUIOverlay.cpp b/base/VulkanUIOverlay.cpp index 4361edf5..546bd38f 100644 --- a/base/VulkanUIOverlay.cpp +++ b/base/VulkanUIOverlay.cpp @@ -1,3 +1,4 @@ + /* * UI overlay class using ImGui * @@ -72,7 +73,8 @@ namespace vks delete[] fontAsset; } #else - io.Fonts->AddFontFromFileTTF("./../data/Roboto-Medium.ttf", 16.0f); + const std::string filename = getAssetPath() + "Roboto-Medium.ttf"; + io.Fonts->AddFontFromFileTTF(filename.c_str(), 16.0f); #endif io.Fonts->GetTexDataAsRGBA32(&fontData, &texWidth, &texHeight); VkDeviceSize uploadSize = texWidth*texHeight * 4 * sizeof(char);