Skip to content

Commit 86bacbb

Browse files
committed
disable clipboxfix by default, it causes too many troubles.
one time calculation for dpi based clipboxfix.
1 parent 1f67f4b commit 86bacbb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

override.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ DWORD WINAPI IMPL_GetGlyphOutlineW(__in HDC hdc, __in UINT uChar, __in UINT fuFo
454454
//lpgm->gmptGlyphOrigin.y += 1;
455455
//lpgm->gmBlackBoxX += 3;
456456
//lpgm->gmBlackBoxY += 2;
457-
int n = (int)ceil(2.0*pSettings->ScreenDpi() / 96);
457+
static int n = (int)ceil(2.0*pSettings->ScreenDpi() / 96);
458458
lpgm->gmptGlyphOrigin.y += n;
459459
lpgm->gmBlackBoxY += n*2;
460460
}
@@ -481,7 +481,7 @@ DWORD WINAPI IMPL_GetGlyphOutlineA(__in HDC hdc, __in UINT uChar, __in UINT fuFo
481481
//lpgm->gmptGlyphOrigin.y += 1;
482482
//lpgm->gmBlackBoxX += 3;
483483
//lpgm->gmBlackBoxY += 2;
484-
int n = (int)ceil(2.0*pSettings->ScreenDpi() / 96);
484+
static int n = (int)ceil(2.0*pSettings->ScreenDpi() / 96);
485485
lpgm->gmptGlyphOrigin.y += n;
486486
lpgm->gmBlackBoxY += n;
487487
}

settings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ bool CGdippSettings::LoadAppSettings(LPCTSTR lpszFile)
423423
m_nCacheMaxBytes = _GetFreeTypeProfileInt(_T("CacheMaxBytes"), 10485760, lpszFile);
424424

425425
//experimental settings:
426-
m_bEnableClipBoxFix = !!_GetFreeTypeProfileIntFromSection(_T("Experimental"), _T("ClipBoxFix"), 1, lpszFile);
426+
m_bEnableClipBoxFix = !!_GetFreeTypeProfileIntFromSection(_T("Experimental"), _T("ClipBoxFix"), 0, lpszFile);
427427

428428
if (m_nFontLoader == SETTING_FONTLOADER_WIN32) {
429429
// APIが処理してくれるはずなので自前処理は無効化

0 commit comments

Comments
 (0)