diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index f727c5c7a..725600573 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -822,7 +822,7 @@ struct NppGUI final bool _muteSounds = false; bool _enableFoldCmdToggable = false; bool _hideMenuRightShortcuts = false; - writeTechnologyEngine _writeTechnologyEngine = defaultTechnology; + writeTechnologyEngine _writeTechnologyEngine = directWriteTechnology; bool _isWordCharDefault = true; std::string _customWordChars; urlMode _styleURL = urlUnderLineFg; diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index 13f9531cf..c73d30d9c 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -312,10 +312,15 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) execute(SCI_INDICSETUNDER, SCE_UNIVERSAL_FOUND_STYLE_EXT4, true); execute(SCI_INDICSETUNDER, SCE_UNIVERSAL_FOUND_STYLE_EXT5, true); - if ((NppParameters::getInstance()).getNppGUI()._writeTechnologyEngine == directWriteTechnology) + HMODULE hNtdllModule = ::GetModuleHandle(L"ntdll.dll"); + FARPROC isWINE = ::GetProcAddress(hNtdllModule, "wine_get_version"); + if ((NppParameters::getInstance()).getNppGUI()._writeTechnologyEngine == directWriteTechnology && !isWINE) // There is a performance issue under WINE when DirectWright is ON, + // so we turn it off if user uses Notepad++ under WINE + { execute(SCI_SETTECHNOLOGY, SC_TECHNOLOGY_DIRECTWRITE); - // If useDirectWrite is turned off, leave the technology setting untouched, - // so that existing plugins using SCI_SETTECHNOLOGY behave like before + // If useDirectWrite is turned off, leave the technology setting untouched, + // so that existing plugins using SCI_SETTECHNOLOGY behave like before + } _codepage = ::GetACP();