mirror of
https://github.com/snowie2000/mactype.git
synced 2025-01-08 11:47:43 +08:00
fixed chrome crash bug
added a new GammaValueDW param which only valid for DW tweak.
This commit is contained in:
parent
f17511494f
commit
fe046debfe
@ -63,10 +63,11 @@ bool MakeD2DParams(IDWriteFactory* dw_factory)
|
||||
dw_factory = pDWriteFactory;
|
||||
}
|
||||
|
||||
const CGdippSettings* pSettings = CGdippSettings::GetInstance();
|
||||
const CGdippSettings* pSettings = CGdippSettings::GetInstanceNoInit();
|
||||
//
|
||||
|
||||
g_D2DParams.Gamma = pSettings->GammaValue()*pSettings->GammaValue() > 1.3 ? pSettings->GammaValue()*pSettings->GammaValue() / 2 : 0.7f;
|
||||
g_D2DParams.Gamma = pSettings->GammaValueForDW(); //user defined value preferred.
|
||||
if (g_D2DParams.Gamma == 0)
|
||||
g_D2DParams.Gamma = pSettings->GammaValue()*pSettings->GammaValue() > 1.3 ? pSettings->GammaValue()*pSettings->GammaValue() / 2 : 0.7f;
|
||||
g_D2DParams.EnhancedContrast = 0.5f;
|
||||
g_D2DParams.ClearTypeLevel = 1.0f;
|
||||
switch (pSettings->GetFontSettings().GetAntiAliasMode())
|
||||
|
@ -364,6 +364,7 @@ SKIP:
|
||||
m_nBolderMode = _GetFreeTypeProfileInt(_T("BolderMode"), 0, lpszFile);
|
||||
m_nGammaMode = _GetFreeTypeProfileInt(_T("GammaMode"), -1, lpszFile);
|
||||
m_fGammaValue = _GetFreeTypeProfileBoundFloat(_T("GammaValue"), 1.0f, GAMMAVALUE_MIN, GAMMAVALUE_MAX, lpszFile);
|
||||
m_fGammaValueForDW = _GetFreeTypeProfileBoundFloat(_T("GammaValueDW"), 0.0f, 0, GAMMAVALUE_MAX, lpszFile);
|
||||
m_fRenderWeight = _GetFreeTypeProfileBoundFloat(_T("RenderWeight"), 1.0f, RENDERWEIGHT_MIN, RENDERWEIGHT_MAX, lpszFile);
|
||||
m_fContrast = _GetFreeTypeProfileBoundFloat(_T("Contrast"), 1.0f, CONTRAST_MIN, CONTRAST_MAX, lpszFile);
|
||||
#ifdef _DEBUG
|
||||
|
@ -254,6 +254,7 @@ private:
|
||||
int m_nBolderMode;
|
||||
int m_nGammaMode;
|
||||
float m_fGammaValue;
|
||||
float m_fGammaValueForDW;
|
||||
float m_fRenderWeight;
|
||||
float m_fContrast;
|
||||
int m_nMaxHeight;
|
||||
@ -345,6 +346,7 @@ private:
|
||||
, m_nBolderMode(0)
|
||||
, m_nGammaMode(0)
|
||||
, m_fGammaValue(1.0f)
|
||||
, m_fGammaValueForDW(0.0f)
|
||||
, m_fRenderWeight(1.0f)
|
||||
, m_fContrast(1.0f)
|
||||
, m_nMaxHeight(0)
|
||||
@ -391,6 +393,7 @@ public:
|
||||
int BolderMode() const { return m_nBolderMode; }
|
||||
int GammaMode() const { return m_nGammaMode; }
|
||||
float GammaValue() const { return m_fGammaValue; }
|
||||
float GammaValueForDW() const { return m_fGammaValueForDW; }
|
||||
float RenderWeight() const { return m_fRenderWeight; }
|
||||
float Contrast() const { return m_fContrast; }
|
||||
int MaxHeight() const { return m_nMaxHeight; }
|
||||
|
Loading…
Reference in New Issue
Block a user