From dcbc339899911e1a3a743de1c0c25d0c253dd39a Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 15 Aug 2024 19:02:46 +1000 Subject: Add SCI_STYLESETSTRETCH to support condensed and expanded text styles. --- win32/PlatWin.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'win32') 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(fp.weight), style, - DWRITE_FONT_STRETCH_NORMAL, fHeight, wsLocale.c_str(), &pTextFormat); + static_cast(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(fp.weight), style, - DWRITE_FONT_STRETCH_NORMAL, fHeight, L"en-us", &pTextFormat); + static_cast(fp.stretch), + fHeight, L"en-us", &pTextFormat); } if (SUCCEEDED(hr)) { pTextFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP); -- cgit v1.2.3