[PATCH v3 2/2] gdi32: Calibrate the registry value to show a similar looks to the Windows.
Byeongsik Jeon
bsjeon at hanmail.net
Mon Oct 15 08:34:46 CDT 2018
Signed-off-by: Byeongsik Jeon <bsjeon at hanmail.net>
---
dlls/gdi32/font.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 36e65a4cef..91a5ba0999 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -736,7 +736,7 @@ static struct font_gamma_table *get_font_gamma_table( void )
static const WCHAR smoothing_gamma[] = {'F','o','n','t','S','m','o','o','t','h','i','n','g',
'G','a','m','m','a',0};
struct font_gamma_table *font_gamma;
- const DWORD gamma_default = 1000; /* FIXME 1400 */
+ const DWORD gamma_default = 1400;
DWORD i, gamma;
HKEY key;
@@ -753,6 +753,10 @@ static struct font_gamma_table *get_font_gamma_table( void )
gamma = min( max( gamma, 1000), 2200 );
}
+ /* Calibration the difference between the registry value and the Wine gamma value.
+ This shows a similar looks to the Windows Native for the same registry value.*/
+ gamma = 1000 * gamma / 1400;
+
for ( i = 0; i < 256; i++ )
{
font_gamma->encode[i] = pow( i / 255., 1000. / gamma ) * 255. + .5;
--
2.19.1
More information about the wine-devel
mailing list