aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-19 11:56:44 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-19 11:56:44 +1100
commit63fbfcb7c05dc7035ebf80805be70b0109def792 (patch)
treefce813e56d4ae059808d5203361680a8abf9ac3a /win32/PlatWin.cxx
parent25aca885085525118aec6fee7c1ff49442d90582 (diff)
downloadscintilla-mirror-63fbfcb7c05dc7035ebf80805be70b0109def792.tar.gz
Add localeName to FontParameters for Bug [#2027].
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index e23dbb120..f7520ad9a 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -301,12 +301,13 @@ struct FontDirectWrite : public FontWin {
extraFontFlag(fp.extraFontFlag),
characterSet(fp.characterSet) {
const std::wstring wsFace = WStringFromUTF8(fp.faceName);
+ const std::wstring wsLocale = WStringFromUTF8(fp.localeName);
const FLOAT fHeight = fp.size;
const DWRITE_FONT_STYLE style = fp.italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL;
HRESULT hr = pIDWriteFactory->CreateTextFormat(wsFace.c_str(), nullptr,
static_cast<DWRITE_FONT_WEIGHT>(fp.weight),
style,
- DWRITE_FONT_STRETCH_NORMAL, fHeight, L"en-us", &pTextFormat);
+ DWRITE_FONT_STRETCH_NORMAL, fHeight, wsLocale.c_str(), &pTextFormat);
if (SUCCEEDED(hr)) {
pTextFormat->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP);