diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-11-18 21:25:44 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-11-18 21:25:44 +0800 |
| commit | df2dadbd0f0ace6e02281c84218537ec2ce5c47f (patch) | |
| tree | 56a360c16c4ba46658572305d3a444fb30d32272 /src/platform/graphics/direct2d/Font.cpp | |
| parent | 3648f669cb42cdd9d232d60c8b9715dfbbe5b31a (diff) | |
| download | cru-df2dadbd0f0ace6e02281c84218537ec2ce5c47f.tar.gz cru-df2dadbd0f0ace6e02281c84218537ec2ce5c47f.tar.bz2 cru-df2dadbd0f0ace6e02281c84218537ec2ce5c47f.zip | |
Add overload of string_view for string utils. clean up codes.
Diffstat (limited to 'src/platform/graphics/direct2d/Font.cpp')
| -rw-r--r-- | src/platform/graphics/direct2d/Font.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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_)); |
