diff --git a/sakura_core/prop/CPropCommon.cpp b/sakura_core/prop/CPropCommon.cpp index a26a7cd3c2..f5109de8eb 100644 --- a/sakura_core/prop/CPropCommon.cpp +++ b/sakura_core/prop/CPropCommon.cpp @@ -44,6 +44,7 @@ #include "env/CDocTypeManager.h" #include "CEditApp.h" #include "util/shell.h" +#include "util/window.h" #include "sakura_rc.h" int CPropCommon::SearchIntArr( int nKey, int* pnArr, int nArrNum ) @@ -495,9 +496,11 @@ HFONT CPropCommon::SetFontLabel( HWND hwndDlg, int idc_static, const LOGFONT& lf TCHAR szFontName[80]; LOGFONT lfTemp; lfTemp = lf; + // 大きすぎるフォントは小さく表示 - if( lfTemp.lfHeight < -16 ){ - lfTemp.lfHeight = -16; + LONG limitSize = ::DpiPointsToPixels( 16 ); + if ( lfTemp.lfHeight < -limitSize ) { + lfTemp.lfHeight = -limitSize; } hFont = SetCtrlFont( hwndDlg, idc_static, lfTemp ); diff --git a/sakura_core/typeprop/CPropTypes.cpp b/sakura_core/typeprop/CPropTypes.cpp index 64c9a89bfd..5e90179034 100644 --- a/sakura_core/typeprop/CPropTypes.cpp +++ b/sakura_core/typeprop/CPropTypes.cpp @@ -26,6 +26,7 @@ #include "CEditApp.h" #include "view/colors/EColorIndexType.h" #include "util/shell.h" +#include "util/window.h" #include "sakura_rc.h" @@ -282,9 +283,11 @@ HFONT CPropTypes::SetFontLabel( HWND hwndDlg, int idc_static, const LOGFONT& lf, TCHAR szFontName[80]; LOGFONT lfTemp; lfTemp = lf; + // 大きすぎるフォントは小さく表示 - if( lfTemp.lfHeight < -16 ){ - lfTemp.lfHeight = -16; + LONG limitSize = ::DpiPointsToPixels( 16 ); + if ( lfTemp.lfHeight < -limitSize ) { + lfTemp.lfHeight = -limitSize; } if (bUse) {