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
abe71945
Commit
abe71945
authored
May 23, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/tests: Skip some tests on variable fonts.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3493792d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
font.c
dlls/dwrite/tests/font.c
+34
-0
dwrite_3.idl
include/dwrite_3.idl
+32
-0
No files found.
dlls/dwrite/tests/font.c
View file @
abe71945
...
...
@@ -2544,6 +2544,19 @@ static void get_logfont_from_font(IDWriteFont *font, LOGFONTW *logfont)
IDWriteFontFace_Release
(
fontface
);
}
static
BOOL
has_face_variations
(
IDWriteFontFace
*
fontface
)
{
IDWriteFontFace5
*
fontface5
;
BOOL
ret
=
FALSE
;
if
(
SUCCEEDED
(
IDWriteFontFace_QueryInterface
(
fontface
,
&
IID_IDWriteFontFace5
,
(
void
**
)
&
fontface5
)))
{
ret
=
IDWriteFontFace5_HasVariations
(
fontface5
);
IDWriteFontFace5_Release
(
fontface5
);
}
return
ret
;
}
static
void
test_ConvertFontFaceToLOGFONT
(
void
)
{
IDWriteFontCollection
*
collection
;
...
...
@@ -2614,6 +2627,13 @@ if (0) /* crashes on native */
hr
=
IDWriteFont_CreateFontFace
(
font
,
&
fontface
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
has_face_variations
(
fontface
))
{
skip
(
"%s: test does not support variable fonts.
\n
"
,
wine_dbgstr_w
(
nameW
));
IDWriteFontFace_Release
(
fontface
);
IDWriteFont_Release
(
font
);
continue
;
}
memset
(
&
logfont
,
0xcc
,
sizeof
(
logfont
));
hr
=
IDWriteGdiInterop_ConvertFontFaceToLOGFONT
(
interop
,
fontface
,
&
logfont
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -4014,6 +4034,8 @@ if (0) { /* crashes on native */
for
(
j
=
0
;
j
<
font_count
;
j
++
)
{
static
const
WCHAR
spaceW
[]
=
{
' '
,
0
};
IDWriteFontFace
*
fontface
;
BOOL
has_variations
;
hr
=
IDWriteFontFamily_GetFont
(
family
,
j
,
&
font
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -4028,6 +4050,18 @@ if (0) { /* crashes on native */
lstrcatW
(
nameW
,
spaceW
);
lstrcatW
(
nameW
,
facenameW
);
hr
=
IDWriteFont_CreateFontFace
(
font
,
&
fontface
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
has_variations
=
has_face_variations
(
fontface
);
IDWriteFontFace_Release
(
fontface
);
if
(
has_variations
)
{
skip
(
"%s: test does not support variable fonts.
\n
"
,
wine_dbgstr_w
(
nameW
));
IDWriteFont_Release
(
font
);
continue
;
}
system
=
FALSE
;
memset
(
&
logfont
,
0xcc
,
sizeof
(
logfont
));
hr
=
IDWriteGdiInterop_ConvertFontToLOGFONT
(
interop
,
font
,
&
logfont
,
&
system
);
...
...
include/dwrite_3.idl
View file @
abe71945
...
...
@@ -22,6 +22,7 @@ interface IDWriteFontFaceReference;
interface
IDWriteFontFace3
;
interface
IDWriteFontSet
;
interface
IDWriteFontDownloadQueue
;
interface
IDWriteFontResource
;
cpp_quote
(
"#ifndef _WINGDI_"
)
/*
already
defined
in
wingdi
.
h
but
needed
for
WIDL
*/
...
...
@@ -457,6 +458,37 @@ interface IDWriteFontFace4 : IDWriteFontFace3
void
ReleaseGlyphImageData
(
void
*
context
)
;
}
typedef
enum
DWRITE_FONT_AXIS_TAG
{
DWRITE_FONT_AXIS_TAG_WEIGHT
=
0
x74686777
,
/*
'wght'
*/
DWRITE_FONT_AXIS_TAG_WIDTH
=
0
x68746477
,
/*
'wdth'
*/
DWRITE_FONT_AXIS_TAG_SLANT
=
0
x746e6c73
,
/*
'slnt'
*/
DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE
=
0
x7a73706f
,
/*
'opsz'
*/
DWRITE_FONT_AXIS_TAG_ITALIC
=
0
x6c617469
,
/*
'ital'
*/
}
DWRITE_FONT_AXIS_TAG
;
typedef
struct
DWRITE_FONT_AXIS_VALUE
{
DWRITE_FONT_AXIS_TAG
axisTag
;
FLOAT
value
;
}
DWRITE_FONT_AXIS_VALUE
;
[
local
,
object
,
uuid
(
98
eff3a5
-
b667
-
479
a
-
b145
-
e2fa5b9fdc29
)
]
interface
IDWriteFontFace5
:
IDWriteFontFace4
{
UINT32
GetFontAxisValueCount
()
;
HRESULT
GetFontAxisValues
(
DWRITE_FONT_AXIS_VALUE
*
values
,
UINT32
value_count
)
;
BOOL
HasVariations
()
;
HRESULT
GetFontResource
(
IDWriteFontResource
**
resource
)
;
BOOL
Equals
(
IDWriteFontFace
*
fontface
)
;
}
typedef
struct
DWRITE_COLOR_GLYPH_RUN1
{
DWRITE_GLYPH_RUN
glyphRun
;
...
...
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