Revision: 9320 https://osdn.net/projects/ttssh2/scm/svn/commits/9320 Author: zmatsuo Date: 2021-06-30 00:19:41 +0900 (Wed, 30 Jun 2021) Log Message: ----------- _Add(Remove)FontResourceExW() を layer_for_unicode から削除 Modified Paths: -------------- trunk/teraterm/common/layer_for_unicode.cpp trunk/teraterm/common/layer_for_unicode.h trunk/teraterm/teraterm/teraterm.cpp -------------- next part -------------- Modified: trunk/teraterm/common/layer_for_unicode.cpp =================================================================== --- trunk/teraterm/common/layer_for_unicode.cpp 2021-06-29 15:19:33 UTC (rev 9319) +++ trunk/teraterm/common/layer_for_unicode.cpp 2021-06-29 15:19:41 UTC (rev 9320) @@ -417,24 +417,6 @@ return result; } -int _AddFontResourceExW(LPCWSTR name, DWORD fl, PVOID res) -{ - if (pAddFontResourceExW != NULL) { - /* Windows 2000\x88ȍ~\x82͎g\x82\xA6\x82\xE9\x82͂\xB8 */ - return pAddFontResourceExW(name, fl, res); - } - return 0; -} - -BOOL _RemoveFontResourceExW(LPCWSTR name, DWORD fl, PVOID pdv) -{ - if (pRemoveFontResourceExW != NULL) { - /* Windows 2000\x88ȍ~\x82͎g\x82\xA6\x82\xE9\x82͂\xB8 */ - return pRemoveFontResourceExW(name, fl, pdv); - } - return FALSE; -} - int _AddFontResourceW(LPCWSTR lpFileName) { char *filenameA = ToCharW(lpFileName); Modified: trunk/teraterm/common/layer_for_unicode.h =================================================================== --- trunk/teraterm/common/layer_for_unicode.h 2021-06-29 15:19:33 UTC (rev 9319) +++ trunk/teraterm/common/layer_for_unicode.h 2021-06-29 15:19:41 UTC (rev 9320) @@ -147,8 +147,6 @@ // gdi32.lib int _AddFontResourceW(LPCWSTR lpFileName); BOOL _RemoveFontResourceW(LPCWSTR lpFileName); -int _AddFontResourceExW(LPCWSTR name, DWORD fl, PVOID res); -BOOL _RemoveFontResourceExW(LPCWSTR name, DWORD fl, PVOID pdv); // Comctl32.lib HPROPSHEETPAGE _CreatePropertySheetPageW(LPCPROPSHEETPAGEW_V1 constPropSheetPagePointer); Modified: trunk/teraterm/teraterm/teraterm.cpp =================================================================== --- trunk/teraterm/teraterm/teraterm.cpp 2021-06-29 15:19:33 UTC (rev 9319) +++ trunk/teraterm/teraterm/teraterm.cpp 2021-06-29 15:19:41 UTC (rev 9320) @@ -80,7 +80,10 @@ // teraterm.exe\x82݂̂ŗL\x8C\xF8\x82ȃt\x83H\x83\x93\x83g\x82ƂȂ\xE9\x81B // remove\x82\xB5\x82Ȃ\xAD\x82Ă\xE0\x8FI\x97\xB9\x82\xB7\x82\xE9\x82\xC6OS\x82\xA9\x82\xE7\x82Ȃ\xAD\x82Ȃ\xE9 - int r = _AddFontResourceExW(TSpecialFont, FR_PRIVATE, NULL); + int r = 0; + if (pAddFontResourceExW != NULL) { + r = pAddFontResourceExW(TSpecialFont, FR_PRIVATE, NULL); + } if (r == 0) { // AddFontResourceEx() \x82\xAA\x8Eg\x82\xA6\x82Ȃ\xA9\x82\xC1\x82\xBD // \x83V\x83X\x83e\x83\x80\x91S\x91̂Ŏg\x82\xA6\x82\xE9\x83t\x83H\x83\x93\x83g\x82ƂȂ\xE9 @@ -97,7 +100,10 @@ if (!AddFontFlag) { return; } - int r = _RemoveFontResourceExW(TSpecialFont, FR_PRIVATE, NULL); + int r = 0; + if (pRemoveFontResourceExW != NULL) { + r = pRemoveFontResourceExW(TSpecialFont, FR_PRIVATE, NULL); + } if (r == 0) { _RemoveFontResourceW(TSpecialFont); }