diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index 7910a7ea..ae45481d 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -489,7 +489,10 @@ Section -"Notepad++" mainSection SetOverwrite off File "..\bin\shortcuts.xml" - File "..\bin\SourceCodePro-Regular.otf" + File "..\bin\SourceCodePro-Regular.ttf" + File "..\bin\SourceCodePro-Bold.ttf" + File "..\bin\SourceCodePro-It.ttf" + File "..\bin\SourceCodePro-BoldIt.ttf" ; Set Section Files and Shortcuts SetOverwrite on @@ -1947,7 +1950,6 @@ Section Uninstall Delete "$INSTDIR\notepad++.exe" Delete "$INSTDIR\readme.txt" - Delete "$INSTDIR\config.xml" Delete "$INSTDIR\config.model.xml" Delete "$INSTDIR\langs.xml" @@ -1961,7 +1963,10 @@ Section Uninstall Delete "$INSTDIR\nativeLang.xml" Delete "$INSTDIR\session.xml" Delete "$INSTDIR\localization\english.xml" - Delete "$INSTDIR\SourceCodePro-Regular.otf" + Delete "$INSTDIR\SourceCodePro-Regular.ttf" + Delete "$INSTDIR\SourceCodePro-Bold.ttf" + Delete "$INSTDIR\SourceCodePro-It.ttf" + Delete "$INSTDIR\SourceCodePro-BoldIt.ttf" SetShellVarContext current Delete "$APPDATA\Notepad++\langs.xml" diff --git a/PowerEditor/installer/packageAll.bat b/PowerEditor/installer/packageAll.bat index 52f03167..c58aa6f4 100644 --- a/PowerEditor/installer/packageAll.bat +++ b/PowerEditor/installer/packageAll.bat @@ -47,7 +47,13 @@ copy /Y ..\bin\"notepad++.exe" .\minimalist\ If ErrorLevel 1 PAUSE copy /Y ..\bin\SciLexer.dll .\minimalist\ If ErrorLevel 1 PAUSE -copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-Regular.otf .\minimalist\ +copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-Regular.ttf .\minimalist\ +If ErrorLevel 1 PAUSE +copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-Bold.ttf .\minimalist\ +If ErrorLevel 1 PAUSE +copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-It.ttf .\minimalist\ +If ErrorLevel 1 PAUSE +copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-BoldIt.ttf .\minimalist\ If ErrorLevel 1 PAUSE @@ -89,7 +95,13 @@ copy /Y ..\bin\"notepad++.exe" .\zipped.package.release\ If ErrorLevel 1 PAUSE copy /Y ..\bin\SciLexer.dll .\zipped.package.release\ If ErrorLevel 1 PAUSE -copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-Regular.otf .\zipped.package.release\ +copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-Regular.ttf .\zipped.package.release\ +If ErrorLevel 1 PAUSE +copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-Bold.ttf .\zipped.package.release\ +If ErrorLevel 1 PAUSE +copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-It.ttf .\zipped.package.release\ +If ErrorLevel 1 PAUSE +copy /Y ..\src\fonts\sourceCodePro\SourceCodePro-BoldIt.ttf .\zipped.package.release\ If ErrorLevel 1 PAUSE rem Plugins diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 46fe2b36..d8886331 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -56,7 +56,10 @@ enum tb_stat {tb_saved, tb_unsaved, tb_ro}; #define NPP_INTERNAL_FUCTION_STR TEXT("Notepad++::InternalFunction") -#define SOURCECODEPRO_FONT TEXT("SourceCodePro-Regular.otf") +#define SOURCECODEPRO_FONT TEXT("SourceCodePro-Regular.ttf") +#define SOURCECODEPRO_I_FONT TEXT("SourceCodePro-It.ttf") +#define SOURCECODEPRO_B_FONT TEXT("SourceCodePro-Bold.ttf") +#define SOURCECODEPRO_IB_FONT TEXT("SourceCodePro-BoldIt.ttf") int docTabIconIDs[] = {IDI_SAVED_ICON, IDI_UNSAVED_ICON, IDI_READONLY_ICON}; @@ -123,11 +126,6 @@ ToolBarButtonUnit toolBarIcons[] = { {IDM_MACRO_SAVECURRENTMACRO, IDI_SAVERECORD_OFF_ICON, IDI_SAVERECORD_ON_ICON, IDI_SAVERECORD_DISABLE_ICON, IDR_SAVERECORD} }; - - - - - Notepad_plus::Notepad_plus(): _mainWindowStatus(0), _pDocTab(NULL), _pEditView(NULL), _pMainSplitter(NULL), _recordingMacro(false), _pTrayIco(NULL), _isUDDocked(false), _pFileSwitcherPanel(NULL), @@ -180,7 +178,6 @@ Notepad_plus::Notepad_plus(): _mainWindowStatus(0), _pDocTab(NULL), _pEditView(N _isAdministrator = is_admin ? true : false; } - Notepad_plus::~Notepad_plus() { // ATTENTION : the order of the destruction is very important @@ -201,19 +198,22 @@ Notepad_plus::~Notepad_plus() delete _pProjectPanel_3; delete _pDocMap; delete _pFuncList; - ::RemoveFontResource(SOURCECODEPRO_FONT); + ::RemoveFontResourceEx(SOURCECODEPRO_FONT, FR_PRIVATE, 0); + ::RemoveFontResourceEx(SOURCECODEPRO_I_FONT, FR_PRIVATE, 0); + ::RemoveFontResourceEx(SOURCECODEPRO_B_FONT, FR_PRIVATE, 0); + ::RemoveFontResourceEx(SOURCECODEPRO_IB_FONT, FR_PRIVATE, 0); } - - - LRESULT Notepad_plus::init(HWND hwnd) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI(); // Add Main font - ::AddFontResource(SOURCECODEPRO_FONT); + ::AddFontResourceEx(SOURCECODEPRO_FONT, FR_PRIVATE, 0); + ::AddFontResourceEx(SOURCECODEPRO_I_FONT, FR_PRIVATE, 0); + ::AddFontResourceEx(SOURCECODEPRO_B_FONT, FR_PRIVATE, 0); + ::AddFontResourceEx(SOURCECODEPRO_IB_FONT, FR_PRIVATE, 0); // Menu _mainMenuHandle = ::GetMenu(hwnd); @@ -713,8 +713,6 @@ LRESULT Notepad_plus::init(HWND hwnd) return TRUE; } - - void Notepad_plus::killAllChildren() { _toolBar.destroy(); diff --git a/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Bold.ttf b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Bold.ttf new file mode 100644 index 00000000..e0c576f1 Binary files /dev/null and b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Bold.ttf differ diff --git a/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-BoldIt.ttf b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-BoldIt.ttf new file mode 100644 index 00000000..9a4010d8 Binary files /dev/null and b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-BoldIt.ttf differ diff --git a/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-It.ttf b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-It.ttf new file mode 100644 index 00000000..e7f1541e Binary files /dev/null and b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-It.ttf differ diff --git a/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Regular.otf b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Regular.otf deleted file mode 100644 index 4e3b9d0b..00000000 Binary files a/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Regular.otf and /dev/null differ diff --git a/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Regular.ttf b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Regular.ttf new file mode 100644 index 00000000..437f4728 Binary files /dev/null and b/PowerEditor/src/fonts/sourceCodePro/SourceCodePro-Regular.ttf differ diff --git a/PowerEditor/visual.net/notepadPlus.vcxproj b/PowerEditor/visual.net/notepadPlus.vcxproj index c3b0db65..f1604fa9 100644 --- a/PowerEditor/visual.net/notepadPlus.vcxproj +++ b/PowerEditor/visual.net/notepadPlus.vcxproj @@ -204,7 +204,10 @@ copy ..\src\stylers.model.xml ..\bin\stylers.model.xml copy ..\src\shortcuts.xml ..\bin\shortcuts.xml copy ..\src\functionList.xml ..\bin\functionList.xml copy ..\src\contextMenu.xml ..\bin\contextMenu.xml -copy ..\src\fonts\sourceCodePro\SourceCodePro-Regular.otf ..\bin\SourceCodePro-Regular.otf +copy ..\src\fonts\sourceCodePro\SourceCodePro-Regular.ttf ..\bin\SourceCodePro-Regular.ttf +copy ..\src\fonts\sourceCodePro\SourceCodePro-Bold.ttf ..\bin\SourceCodePro-Bold.ttf +copy ..\src\fonts\sourceCodePro\SourceCodePro-It.ttf ..\bin\SourceCodePro-It.ttf +copy ..\src\fonts\sourceCodePro\SourceCodePro-BoldIt.ttf ..\bin\SourceCodePro-BoldIt.ttf ..\misc\vistaIconTool\changeIcon.bat "..\misc\vistaIconTool\ChangeIcon.exe" "$(OutDir)notepad++.exe"