Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f7a4936f
Commit
f7a4936f
authored
Sep 03, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Make tests pass on Win7. Conform to the more recent behavior.
parent
70241904
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
14 deletions
+25
-14
usp10.c
dlls/usp10/tests/usp10.c
+20
-12
usp10.c
dlls/usp10/usp10.c
+5
-2
No files found.
dlls/usp10/tests/usp10.c
View file @
f7a4936f
...
...
@@ -67,9 +67,10 @@ static void test_ScriptShape(HDC hdc)
ok
(
hr
==
E_PENDING
,
"ScriptShape should return E_PENDING not %08x
\n
"
,
hr
);
hr
=
ScriptShape
(
hdc
,
&
sc
,
test1
,
4
,
4
,
&
items
[
0
].
a
,
glyphs
,
NULL
,
attrs
,
&
nb
);
ok
(
!
hr
||
hr
==
E_INVALIDARG
,
/* Vista, W2K8 */
"ScriptShape should return S_OK or E_INVALIDARG, not %08x
\n
"
,
hr
);
ok
(
broken
(
hr
==
S_OK
)
||
hr
==
E_INVALIDARG
||
/* Vista, W2K8 */
hr
==
E_FAIL
,
/* WIN7 */
"ScriptShape should return E_FAIL or E_INVALIDARG, not %08x
\n
"
,
hr
);
ok
(
items
[
0
].
a
.
fNoGlyphIndex
==
FALSE
,
"fNoGlyphIndex TRUE
\n
"
);
hr
=
ScriptShape
(
hdc
,
&
sc
,
test1
,
4
,
4
,
&
items
[
0
].
a
,
glyphs
,
logclust
,
attrs
,
&
nb
);
...
...
@@ -83,17 +84,19 @@ static void test_ScriptShape(HDC hdc)
ok
(
hr
==
E_INVALIDARG
,
"ScriptPlace should return E_INVALIDARG not %08x
\n
"
,
hr
);
hr
=
ScriptPlace
(
NULL
,
&
sc
,
glyphs
,
4
,
attrs
,
&
items
[
0
].
a
,
widths
,
NULL
,
NULL
);
ok
(
hr
==
E_PENDING
||
hr
==
E_INVALIDARG
,
/* Vista, W2K8 */
"ScriptPlace should return E_PENDING or E_INVALIDARG, not %08x
\n
"
,
hr
);
ok
(
broken
(
hr
==
E_PENDING
)
||
hr
==
E_INVALIDARG
||
/* Vista, W2K8 */
hr
==
E_FAIL
,
/* WIN7 */
"ScriptPlace should return E_FAIL or E_INVALIDARG, not %08x
\n
"
,
hr
);
hr
=
ScriptPlace
(
NULL
,
&
sc
,
glyphs
,
4
,
attrs
,
&
items
[
0
].
a
,
widths
,
offset
,
NULL
);
ok
(
hr
==
E_PENDING
,
"ScriptPlace should return E_PENDING not %08x
\n
"
,
hr
);
hr
=
ScriptPlace
(
NULL
,
&
sc
,
glyphs
,
4
,
attrs
,
&
items
[
0
].
a
,
widths
,
NULL
,
abc
);
ok
(
hr
==
E_PENDING
||
hr
==
E_INVALIDARG
,
/* Vista, W2K8 */
"ScriptPlace should return E_PENDING or E_INVALIDARG, not %08x
\n
"
,
hr
);
ok
(
broken
(
hr
==
E_PENDING
)
||
hr
==
E_INVALIDARG
||
/* Vista, W2K8 */
hr
==
E_FAIL
,
/* WIN7 */
"ScriptPlace should return E_FAIL or E_INVALIDARG, not %08x
\n
"
,
hr
);
hr
=
ScriptPlace
(
hdc
,
&
sc
,
glyphs
,
4
,
attrs
,
&
items
[
0
].
a
,
widths
,
offset
,
NULL
);
ok
(
!
hr
,
"ScriptPlace should return S_OK not %08x
\n
"
,
hr
);
...
...
@@ -339,14 +342,14 @@ static void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256])
/* Set psc to NULL, to be able to check if a pointer is returned in psc */
psc
=
NULL
;
hr
=
ScriptGetCMap
(
NULL
,
&
psc
,
NULL
,
0
,
0
,
NULL
);
ok
(
hr
==
E_PENDING
,
"(NULL,&psc,NULL,0,0NULL), expected E_PENDING, "
hr
=
ScriptGetCMap
(
NULL
,
&
psc
,
TestItem1
,
cInChars
,
0
,
pwOutGlyphs3
);
ok
(
hr
==
E_PENDING
,
"(NULL,&psc,NULL,0,0
,
NULL), expected E_PENDING, "
"got %08x
\n
"
,
hr
);
ok
(
psc
==
NULL
,
"Expected psc to be NULL, got %p
\n
"
,
psc
);
/* Set psc to NULL but add hdc, to be able to check if a pointer is returned in psc */
psc
=
NULL
;
hr
=
ScriptGetCMap
(
hdc
,
&
psc
,
NULL
,
0
,
0
,
NULL
);
hr
=
ScriptGetCMap
(
hdc
,
&
psc
,
TestItem1
,
cInChars
,
0
,
pwOutGlyphs3
);
ok
(
hr
==
S_OK
,
"ScriptGetCMap(NULL,&psc,NULL,0,0,NULL), expected S_OK, "
"got %08x
\n
"
,
hr
);
ok
(
psc
!=
NULL
,
"ScritpGetCMap expected psc to be not NULL
\n
"
);
...
...
@@ -1058,6 +1061,11 @@ static void test_ScriptGetGlyphABCWidth(HDC hdc)
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
hr
=
ScriptGetGlyphABCWidth
(
NULL
,
&
sc
,
'a'
,
NULL
);
ok
(
broken
(
hr
==
E_PENDING
)
||
hr
==
E_INVALIDARG
,
/* WIN7 */
"expected E_INVALIDARG, got 0x%08x
\n
"
,
hr
);
hr
=
ScriptGetGlyphABCWidth
(
NULL
,
&
sc
,
'a'
,
&
abc
);
ok
(
hr
==
E_PENDING
,
"expected E_PENDING, got 0x%08x
\n
"
,
hr
);
if
(
0
)
{
/* crashes on WinXP */
...
...
dlls/usp10/usp10.c
View file @
f7a4936f
...
...
@@ -1298,6 +1298,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
*
pcGlyphs
=
cChars
;
if
((
hr
=
init_script_cache
(
hdc
,
psc
))
!=
S_OK
)
return
hr
;
if
(
!
pwLogClust
)
return
E_FAIL
;
if
((
get_cache_pitch_family
(
psc
)
&
TMPF_TRUETYPE
)
&&
!
psa
->
fNoGlyphIndex
)
{
...
...
@@ -1329,7 +1330,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
psva
[
i
].
fReserved
=
0
;
psva
[
i
].
fShapeReserved
=
0
;
if
(
pwLogClust
)
pwLogClust
[
i
]
=
i
;
pwLogClust
[
i
]
=
i
;
}
return
S_OK
;
}
...
...
@@ -1366,6 +1367,7 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs,
if
(
!
psva
)
return
E_INVALIDARG
;
if
((
hr
=
init_script_cache
(
hdc
,
psc
))
!=
S_OK
)
return
hr
;
if
(
!
pGoffset
)
return
E_FAIL
;
if
(
pABC
)
memset
(
pABC
,
0
,
sizeof
(
ABC
));
for
(
i
=
0
;
i
<
cGlyphs
;
i
++
)
...
...
@@ -1394,7 +1396,7 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs,
pABC
->
abcC
+=
abc
.
abcC
;
}
/* FIXME: set to more reasonable values */
if
(
pGoffset
)
pGoffset
[
i
].
du
=
pGoffset
[
i
].
dv
=
0
;
pGoffset
[
i
].
du
=
pGoffset
[
i
].
dv
=
0
;
if
(
piAdvance
)
piAdvance
[
i
]
=
abc
.
abcA
+
abc
.
abcB
+
abc
.
abcC
;
}
...
...
@@ -1527,6 +1529,7 @@ HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, AB
TRACE
(
"(%p, %p, 0x%04x, %p)
\n
"
,
hdc
,
psc
,
glyph
,
abc
);
if
(
!
abc
)
return
E_INVALIDARG
;
if
((
hr
=
init_script_cache
(
hdc
,
psc
))
!=
S_OK
)
return
hr
;
if
(
!
get_cache_glyph_widths
(
psc
,
glyph
,
abc
))
...
...
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