From 63fbfcb7c05dc7035ebf80805be70b0109def792 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 19 Mar 2021 11:56:44 +1100 Subject: Add localeName to FontParameters for Bug [#2027]. --- win32/PlatWin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'win32') 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(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); -- cgit v1.2.3