aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2024-08-15 19:02:46 +1000
committerNeil <nyamatongwe@gmail.com>2024-08-15 19:02:46 +1000
commitdcbc339899911e1a3a743de1c0c25d0c253dd39a (patch)
tree3d4fcd3405e7b4620476c36b0102031114bf65ad /win32
parent6f51f5975920272f5f691d690107d15291a335f2 (diff)
downloadscintilla-mirror-dcbc339899911e1a3a743de1c0c25d0c253dd39a.tar.gz
Add SCI_STYLESETSTRETCH to support condensed and expanded text styles.
Diffstat (limited to 'win32')
-rw-r--r--win32/PlatWin.cxx6
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);