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
788e1dc7
Commit
788e1dc7
authored
Feb 03, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/tests: Skip tests if no English family name was returned.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b8449062
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
4 deletions
+43
-4
layout.c
dlls/dwrite/tests/layout.c
+43
-4
No files found.
dlls/dwrite/tests/layout.c
View file @
788e1dc7
...
...
@@ -3207,7 +3207,7 @@ static IDWriteFontFace *get_fontface_from_format(IDWriteTextFormat *format)
return
fontface
;
}
static
void
get_enus_string
(
IDWriteLocalizedStrings
*
strings
,
WCHAR
*
buff
,
UINT32
size
)
static
BOOL
get_enus_string
(
IDWriteLocalizedStrings
*
strings
,
WCHAR
*
buff
,
UINT32
size
)
{
UINT32
index
;
BOOL
exists
=
FALSE
;
...
...
@@ -3217,8 +3217,14 @@ static void get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, UINT3
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
exists
,
"got %d
\n
"
,
exists
);
hr
=
IDWriteLocalizedStrings_GetString
(
strings
,
index
,
buff
,
size
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
exists
)
{
hr
=
IDWriteLocalizedStrings_GetString
(
strings
,
index
,
buff
,
size
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
}
else
*
buff
=
0
;
return
exists
;
}
static
void
test_GetLineMetrics
(
void
)
...
...
@@ -3274,6 +3280,7 @@ static void test_GetLineMetrics(void)
IDWriteLocalizedStrings
*
names
;
IDWriteFontFamily
*
family
;
IDWriteFont
*
font
;
BOOL
exists
;
format
=
NULL
;
layout
=
NULL
;
...
...
@@ -3291,11 +3298,43 @@ static void test_GetLineMetrics(void)
hr
=
IDWriteFontFamily_GetFamilyNames
(
family
,
&
names
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
get_enus_string
(
names
,
nameW
,
sizeof
(
nameW
)
/
sizeof
(
nameW
[
0
]));
if
(
!
(
exists
=
get_enus_string
(
names
,
nameW
,
sizeof
(
nameW
)
/
sizeof
(
nameW
[
0
]))))
{
IDWriteLocalFontFileLoader
*
localloader
;
IDWriteFontFileLoader
*
loader
;
IDWriteFontFile
*
file
;
const
void
*
key
;
UINT32
keysize
;
UINT32
count
;
count
=
1
;
hr
=
IDWriteFontFace_GetFiles
(
fontface
,
&
count
,
&
file
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFontFile_GetLoader
(
file
,
&
loader
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFontFileLoader_QueryInterface
(
loader
,
&
IID_IDWriteLocalFontFileLoader
,
(
void
**
)
&
localloader
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFontFileLoader_Release
(
loader
);
hr
=
IDWriteFontFile_GetReferenceKey
(
file
,
&
key
,
&
keysize
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteLocalFontFileLoader_GetFilePathFromKey
(
localloader
,
key
,
keysize
,
nameW
,
sizeof
(
nameW
)
/
sizeof
(
*
nameW
));
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
skip
(
"Failed to get English family name, font file %s
\n
"
,
wine_dbgstr_w
(
nameW
));
IDWriteLocalFontFileLoader_Release
(
localloader
);
IDWriteFontFile_Release
(
file
);
}
IDWriteLocalizedStrings_Release
(
names
);
IDWriteFont_Release
(
font
);
if
(
!
exists
)
goto
cleanup
;
/* This will effectively skip on Vista/2008 only, newer systems work just fine with this font. */
if
(
!
lstrcmpW
(
nameW
,
mvboliW
))
{
skip
(
"Skipping line metrics test for %s, gives inconsistent results
\n
"
,
wine_dbgstr_w
(
nameW
));
...
...
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