From 5141643531033f9ccf377d6ee2b73e350f38a5f2 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Thu, 8 Aug 2024 00:27:39 +0300 Subject: [PATCH] Fix freetype font build for windows --- libs/fonts/source/freetype.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/fonts/source/freetype.cpp b/libs/fonts/source/freetype.cpp index c78a96fd..fd352d80 100644 --- a/libs/fonts/source/freetype.cpp +++ b/libs/fonts/source/freetype.cpp @@ -334,7 +334,8 @@ namespace psemek::fonts std::unique_ptr load_freetype_font(wgpu::device device, std::filesystem::path const & path) { FT_Face face; - ft_check_result(FT_New_Face(ft_library(), path.c_str(), 0, &face), "Failed to load font " + path.string() + ": "); + auto path_str = path.string(); + ft_check_result(FT_New_Face(ft_library(), path_str.data(), 0, &face), "Failed to load font " + path_str + ": "); auto result = std::make_unique(std::make_shared(device, face));