Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e65b19ca
Commit
e65b19ca
authored
Jun 09, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Do not normalize height of the default GUI font.
parent
00fb537a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
38 deletions
+1
-38
gdiobj.c
dlls/gdi32/gdiobj.c
+1
-35
font.c
dlls/gdi32/tests/font.c
+0
-3
No files found.
dlls/gdi32/gdiobj.c
View file @
e65b19ca
...
...
@@ -492,34 +492,6 @@ static UINT get_default_charset( void )
return
csi
.
ciCharset
;
}
static
const
WCHAR
dpi_key_name
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'F'
,
'o'
,
'n'
,
't'
,
's'
,
'\0'
};
static
const
WCHAR
dpi_value_name
[]
=
{
'L'
,
'o'
,
'g'
,
'P'
,
'i'
,
'x'
,
'e'
,
'l'
,
's'
,
'\0'
};
/******************************************************************************
* get_dpi (internal)
*
* get the dpi from the registry
*/
static
DWORD
get_dpi
(
void
)
{
DWORD
dpi
=
96
;
HKEY
hkey
;
if
(
RegOpenKeyW
(
HKEY_CURRENT_CONFIG
,
dpi_key_name
,
&
hkey
)
==
ERROR_SUCCESS
)
{
DWORD
type
,
size
,
new_dpi
;
size
=
sizeof
(
new_dpi
);
if
(
RegQueryValueExW
(
hkey
,
dpi_value_name
,
NULL
,
&
type
,
(
void
*
)
&
new_dpi
,
&
size
)
==
ERROR_SUCCESS
)
{
if
(
type
==
REG_DWORD
&&
new_dpi
!=
0
)
dpi
=
new_dpi
;
}
RegCloseKey
(
hkey
);
}
return
dpi
;
}
/***********************************************************************
* GDI_inc_ref_count
...
...
@@ -574,7 +546,6 @@ BOOL GDI_dec_ref_count( HGDIOBJ handle )
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
inst
,
DWORD
reason
,
LPVOID
reserved
)
{
LOGFONTW
default_gui_font
;
const
struct
DefaultFontInfo
*
deffonts
;
int
i
;
...
...
@@ -609,12 +580,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
stock_objects
[
SYSTEM_FONT
]
=
CreateFontIndirectW
(
&
deffonts
->
SystemFont
);
stock_objects
[
DEVICE_DEFAULT_FONT
]
=
CreateFontIndirectW
(
&
deffonts
->
DeviceDefaultFont
);
stock_objects
[
SYSTEM_FIXED_FONT
]
=
CreateFontIndirectW
(
&
deffonts
->
SystemFixedFont
);
/* For the default gui font, we use the lfHeight member in deffonts as a place-holder
for the point size so we must convert this into a true height */
default_gui_font
=
deffonts
->
DefaultGuiFont
;
default_gui_font
.
lfHeight
=
-
MulDiv
(
default_gui_font
.
lfHeight
,
get_dpi
(),
72
);
stock_objects
[
DEFAULT_GUI_FONT
]
=
CreateFontIndirectW
(
&
default_gui_font
);
stock_objects
[
DEFAULT_GUI_FONT
]
=
CreateFontIndirectW
(
&
deffonts
->
DefaultGuiFont
);
stock_objects
[
DC_BRUSH
]
=
CreateBrushIndirect
(
&
DCBrush
);
stock_objects
[
DC_PEN
]
=
CreatePenIndirect
(
&
DCPen
);
...
...
dlls/gdi32/tests/font.c
View file @
e65b19ca
...
...
@@ -4422,9 +4422,6 @@ static void test_stock_fonts(void)
}
ok
(
td
[
i
].
weight
==
lf
.
lfWeight
,
"%d: expected lfWeight %d, got %d
\n
"
,
i
,
td
[
i
].
weight
,
lf
.
lfWeight
);
if
(
td
[
i
].
height
<
0
)
/* FIXME: remove once Wine is fixed */
todo_wine
ok
(
td
[
i
].
height
==
lf
.
lfHeight
,
"%d: expected lfHeight %d, got %d
\n
"
,
i
,
td
[
i
].
height
,
lf
.
lfHeight
);
else
ok
(
td
[
i
].
height
==
lf
.
lfHeight
,
"%d: expected lfHeight %d, got %d
\n
"
,
i
,
td
[
i
].
height
,
lf
.
lfHeight
);
ok
(
!
lstrcmp
(
td
[
i
].
face_name
,
lf
.
lfFaceName
),
"%d: expected lfFaceName %s, got %s
\n
"
,
i
,
td
[
i
].
face_name
,
lf
.
lfFaceName
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment