diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/PlatWin.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index ac1fcb51d..176acab10 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -347,13 +347,15 @@ struct FontDirectWrite : public FontWin { HRESULT hr = pIDWriteFactory->CreateTextFormat(wsFace.c_str(), nullptr, static_cast<DWRITE_FONT_WEIGHT>(fp.weight), style, - DWRITE_FONT_STRETCH_NORMAL, fHeight, wsLocale.c_str(), &pTextFormat); + static_cast<DWRITE_FONT_STRETCH>(fp.stretch), + fHeight, wsLocale.c_str(), &pTextFormat); if (hr == E_INVALIDARG) { // Possibly a bad locale name like "/" so try "en-us". hr = pIDWriteFactory->CreateTextFormat(wsFace.c_str(), nullptr, static_cast<DWRITE_FONT_WEIGHT>(fp.weight), style, - DWRITE_FONT_STRETCH_NORMAL, fHeight, L"en-us", &pTextFormat); + static_cast<DWRITE_FONT_STRETCH>(fp.stretch), + fHeight, L"en-us", &pTextFormat); } if (SUCCEEDED(hr)) { pTextFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP); |