From df2dadbd0f0ace6e02281c84218537ec2ce5c47f Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Tue, 18 Nov 2025 21:25:44 +0800 Subject: Add overload of string_view for string utils. clean up codes. --- src/platform/graphics/direct2d/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/platform/graphics/direct2d/Font.cpp') diff --git a/src/platform/graphics/direct2d/Font.cpp b/src/platform/graphics/direct2d/Font.cpp index 18a4a2c7..4e0a5e49 100644 --- a/src/platform/graphics/direct2d/Font.cpp +++ b/src/platform/graphics/direct2d/Font.cpp @@ -17,7 +17,7 @@ DWriteFont::DWriteFont(DirectGraphicsFactory* factory, std::string font_family, ::GetLastError(), "Failed to get locale when create dwrite font."); CheckHResult(factory->GetDWriteFactory()->CreateTextFormat( - string::ToUtf16(font_family_).c_str(), nullptr, DWRITE_FONT_WEIGHT_NORMAL, + string::ToUtf16WString(font_family_).c_str(), nullptr, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, font_size, buffer.data(), &text_format_)); -- cgit v1.2.3