Skip to content

Commit 6b441b7

Browse files
committed
Prevent DirectWrite from being ON under Windows Sever (Core)
1 parent 3ee5ef0 commit 6b441b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <shlwapi.h>
2020
#include <cinttypes>
2121
#include <windowsx.h>
22+
#include <versionhelpers.h>
2223
#include "ScintillaEditView.h"
2324
#include "Parameters.h"
2425
#include "localization.h"
@@ -314,7 +315,8 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
314315
if (hNtdllModule)
315316
isWINE = ::GetProcAddress(hNtdllModule, "wine_get_version");
316317

317-
if (isWINE) // There is a performance issue under WINE when DirectWright is ON, so we turn it off if user uses Notepad++ under WINE
318+
if (isWINE || // There is a performance issue under WINE when DirectWrite is ON, so we turn it off if user uses Notepad++ under WINE
319+
::IsWindowsServer()) // In the case of Windows Server Core, DirectWrite cannot be on.
318320
nppGui._writeTechnologyEngine = defaultTechnology;
319321

320322
if (nppGui._writeTechnologyEngine == directWriteTechnology)

0 commit comments

Comments
 (0)