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
e4beddb6
Commit
e4beddb6
authored
Nov 16, 2009
by
André Hentschel
Committed by
Alexandre Julliard
Nov 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Don't strip font suffix.
parent
3f63a296
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
28 deletions
+0
-28
font.c
dlls/gdi32/font.c
+0
-22
font.c
dlls/gdi32/tests/font.c
+0
-6
No files found.
dlls/gdi32/font.c
View file @
e4beddb6
...
...
@@ -306,10 +306,6 @@ HFONT WINAPI CreateFontIndirectA( const LOGFONTA *plfA )
*/
HFONT
WINAPI
CreateFontIndirectW
(
const
LOGFONTW
*
plf
)
{
static
const
WCHAR
ItalicW
[]
=
{
' '
,
'I'
,
't'
,
'a'
,
'l'
,
'i'
,
'c'
,
'\0'
};
static
const
WCHAR
BoldW
[]
=
{
' '
,
'B'
,
'o'
,
'l'
,
'd'
,
'\0'
};
WCHAR
*
pFaceNameItalicSuffix
,
*
pFaceNameBoldSuffix
;
WCHAR
*
pFaceNameSuffix
=
NULL
;
HFONT
hFont
;
FONTOBJ
*
fontPtr
;
...
...
@@ -328,24 +324,6 @@ HFONT WINAPI CreateFontIndirectW( const LOGFONTW *plf )
plf
->
lfOrientation
/
10
.,
plf
->
lfEscapement
/
10
.,
fontPtr
);
}
pFaceNameItalicSuffix
=
strstrW
(
fontPtr
->
logfont
.
lfFaceName
,
ItalicW
);
if
(
pFaceNameItalicSuffix
)
{
fontPtr
->
logfont
.
lfItalic
=
TRUE
;
pFaceNameSuffix
=
pFaceNameItalicSuffix
;
}
pFaceNameBoldSuffix
=
strstrW
(
fontPtr
->
logfont
.
lfFaceName
,
BoldW
);
if
(
pFaceNameBoldSuffix
)
{
if
(
fontPtr
->
logfont
.
lfWeight
<
FW_BOLD
)
fontPtr
->
logfont
.
lfWeight
=
FW_BOLD
;
if
(
!
pFaceNameSuffix
||
(
pFaceNameBoldSuffix
<
pFaceNameSuffix
))
pFaceNameSuffix
=
pFaceNameBoldSuffix
;
}
if
(
pFaceNameSuffix
)
*
pFaceNameSuffix
=
0
;
if
(
!
(
hFont
=
alloc_gdi_handle
(
&
fontPtr
->
header
,
OBJ_FONT
,
&
font_funcs
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
fontPtr
);
...
...
dlls/gdi32/tests/font.c
View file @
e4beddb6
...
...
@@ -3013,15 +3013,12 @@ void test_CreateFontIndirect(void)
ok
(
hfont
!=
0
,
"CreateFontIndirectA failed
\n
"
);
ret
=
GetObject
(
hfont
,
sizeof
(
getobj_lf
),
&
getobj_lf
);
ok
(
lf
.
lfItalic
==
getobj_lf
.
lfItalic
,
"lfItalic: expect %02x got %02x
\n
"
,
lf
.
lfItalic
,
getobj_lf
.
lfItalic
);
todo_wine
{
ok
(
lf
.
lfWeight
==
getobj_lf
.
lfWeight
||
broken
((
SHORT
)
lf
.
lfWeight
==
getobj_lf
.
lfWeight
),
/* win9x */
"lfWeight: expect %08x got %08x
\n
"
,
lf
.
lfWeight
,
getobj_lf
.
lfWeight
);
ok
(
!
lstrcmpA
(
lf
.
lfFaceName
,
getobj_lf
.
lfFaceName
)
||
broken
(
!
memcmp
(
lf
.
lfFaceName
,
getobj_lf
.
lfFaceName
,
LF_FACESIZE
-
1
)),
/* win9x doesn't ensure '\0' termination */
"font names don't match: %s != %s
\n
"
,
lf
.
lfFaceName
,
getobj_lf
.
lfFaceName
);
}
DeleteObject
(
hfont
);
lf
.
lfItalic
=
FALSE
;
...
...
@@ -3033,13 +3030,10 @@ void test_CreateFontIndirect(void)
ok
(
lf
.
lfWeight
==
getobj_lf
.
lfWeight
||
broken
((
SHORT
)
lf
.
lfWeight
==
getobj_lf
.
lfWeight
),
/* win9x */
"lfWeight: expect %08x got %08x
\n
"
,
lf
.
lfWeight
,
getobj_lf
.
lfWeight
);
todo_wine
{
ok
(
lf
.
lfItalic
==
getobj_lf
.
lfItalic
,
"lfItalic: expect %02x got %02x
\n
"
,
lf
.
lfItalic
,
getobj_lf
.
lfItalic
);
ok
(
!
lstrcmpA
(
lf
.
lfFaceName
,
getobj_lf
.
lfFaceName
)
||
broken
(
!
memcmp
(
lf
.
lfFaceName
,
getobj_lf
.
lfFaceName
,
LF_FACESIZE
-
1
)),
/* win9x doesn't ensure '\0' termination */
"font names don't match: %s != %s
\n
"
,
lf
.
lfFaceName
,
getobj_lf
.
lfFaceName
);
}
DeleteObject
(
hfont
);
}
...
...
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