diff options
Diffstat (limited to 'src/platform/graphics/direct2d/Font.cpp')
| -rw-r--r-- | src/platform/graphics/direct2d/Font.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/platform/graphics/direct2d/Font.cpp b/src/platform/graphics/direct2d/Font.cpp index 50f7c266..18a4a2c7 100644 --- a/src/platform/graphics/direct2d/Font.cpp +++ b/src/platform/graphics/direct2d/Font.cpp @@ -16,13 +16,13 @@ DWriteFont::DWriteFont(DirectGraphicsFactory* factory, std::string font_family, throw platform::win::Win32Error( ::GetLastError(), "Failed to get locale when create dwrite font."); - ThrowIfFailed(factory->GetDWriteFactory()->CreateTextFormat( + CheckHResult(factory->GetDWriteFactory()->CreateTextFormat( string::ToUtf16(font_family_).c_str(), nullptr, DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, font_size, buffer.data(), &text_format_)); - ThrowIfFailed(text_format_->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_LEADING)); - ThrowIfFailed( + CheckHResult(text_format_->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_LEADING)); + CheckHResult( text_format_->SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT_NEAR)); } |
