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
1e8a706b
Commit
1e8a706b
authored
Nov 06, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Update file type and face type enums.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f7187ecb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
10 deletions
+12
-10
main.c
dlls/dwrite/main.c
+1
-1
opentype.c
dlls/dwrite/opentype.c
+4
-4
font.c
dlls/dwrite/tests/font.c
+1
-1
dwrite.idl
include/dwrite.idl
+6
-4
No files found.
dlls/dwrite/main.c
View file @
1e8a706b
...
...
@@ -895,7 +895,7 @@ static HRESULT WINAPI dwritefactory_CreateFontFace(IDWriteFactory4 *iface,
if
(
!
is_face_type_supported
(
req_facetype
))
return
E_INVALIDARG
;
if
(
req_facetype
!=
DWRITE_FONT_FACE_TYPE_
TRUE
TYPE_COLLECTION
&&
index
)
if
(
req_facetype
!=
DWRITE_FONT_FACE_TYPE_
OPEN
TYPE_COLLECTION
&&
index
)
return
E_INVALIDARG
;
if
(
!
is_simulation_valid
(
simulations
))
...
...
dlls/dwrite/opentype.c
View file @
1e8a706b
...
...
@@ -810,7 +810,7 @@ BOOL is_face_type_supported(DWRITE_FONT_FACE_TYPE type)
{
return
(
type
==
DWRITE_FONT_FACE_TYPE_CFF
)
||
(
type
==
DWRITE_FONT_FACE_TYPE_TRUETYPE
)
||
(
type
==
DWRITE_FONT_FACE_TYPE_
TRUE
TYPE_COLLECTION
)
||
(
type
==
DWRITE_FONT_FACE_TYPE_
OPEN
TYPE_COLLECTION
)
||
(
type
==
DWRITE_FONT_FACE_TYPE_RAW_CFF
);
}
...
...
@@ -831,8 +831,8 @@ static HRESULT opentype_ttc_analyzer(IDWriteFontFileStream *stream, UINT32 *font
if
(
!
memcmp
(
header
->
TTCTag
,
&
ttctag
,
sizeof
(
ttctag
)))
{
*
font_count
=
GET_BE_DWORD
(
header
->
numFonts
);
*
file_type
=
DWRITE_FONT_FILE_TYPE_
TRUE
TYPE_COLLECTION
;
*
face_type
=
DWRITE_FONT_FACE_TYPE_
TRUE
TYPE_COLLECTION
;
*
file_type
=
DWRITE_FONT_FILE_TYPE_
OPEN
TYPE_COLLECTION
;
*
face_type
=
DWRITE_FONT_FACE_TYPE_
OPEN
TYPE_COLLECTION
;
}
IDWriteFontFileStream_ReleaseFileFragment
(
stream
,
context
);
...
...
@@ -1013,7 +1013,7 @@ HRESULT opentype_get_font_table(struct file_stream_desc *stream_desc, UINT32 tag
*
table_data
=
NULL
;
*
table_context
=
NULL
;
if
(
stream_desc
->
face_type
==
DWRITE_FONT_FACE_TYPE_
TRUE
TYPE_COLLECTION
)
{
if
(
stream_desc
->
face_type
==
DWRITE_FONT_FACE_TYPE_
OPEN
TYPE_COLLECTION
)
{
const
TTC_Header_V1
*
ttc_header
;
void
*
ttc_context
;
hr
=
IDWriteFontFileStream_ReadFileFragment
(
stream_desc
->
stream
,
(
const
void
**
)
&
ttc_header
,
0
,
sizeof
(
*
ttc_header
),
&
ttc_context
);
...
...
dlls/dwrite/tests/font.c
View file @
1e8a706b
...
...
@@ -1603,7 +1603,7 @@ static void test_CreateFontFace(void)
hr
=
IDWriteFactory_CreateFontFace
(
factory
,
DWRITE_FONT_FACE_TYPE_CFF
,
1
,
&
file
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
fontface
);
ok
(
hr
==
DWRITE_E_FILEFORMAT
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateFontFace
(
factory
,
DWRITE_FONT_FACE_TYPE_
TRUE
TYPE_COLLECTION
,
1
,
&
file
,
0
,
hr
=
IDWriteFactory_CreateFontFace
(
factory
,
DWRITE_FONT_FACE_TYPE_
OPEN
TYPE_COLLECTION
,
1
,
&
file
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
fontface
);
ok
(
hr
==
DWRITE_E_FILEFORMAT
||
broken
(
hr
==
E_FAIL
)
/* < win10 */
,
"got 0x%08x
\n
"
,
hr
);
...
...
include/dwrite.idl
View file @
1e8a706b
...
...
@@ -48,23 +48,25 @@ typedef enum DWRITE_FONT_FILE_TYPE
DWRITE_FONT_FILE_TYPE_UNKNOWN
,
DWRITE_FONT_FILE_TYPE_CFF
,
DWRITE_FONT_FILE_TYPE_TRUETYPE
,
DWRITE_FONT_FILE_TYPE_
TRUE
TYPE_COLLECTION
,
DWRITE_FONT_FILE_TYPE_
OPEN
TYPE_COLLECTION
,
DWRITE_FONT_FILE_TYPE_TYPE1_PFM
,
DWRITE_FONT_FILE_TYPE_TYPE1_PFB
,
DWRITE_FONT_FILE_TYPE_VECTOR
,
DWRITE_FONT_FILE_TYPE_BITMAP
DWRITE_FONT_FILE_TYPE_BITMAP
,
DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION
=
DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION
}
DWRITE_FONT_FILE_TYPE
;
typedef
enum
DWRITE_FONT_FACE_TYPE
{
DWRITE_FONT_FACE_TYPE_CFF
,
DWRITE_FONT_FACE_TYPE_TRUETYPE
,
DWRITE_FONT_FACE_TYPE_
TRUE
TYPE_COLLECTION
,
DWRITE_FONT_FACE_TYPE_
OPEN
TYPE_COLLECTION
,
DWRITE_FONT_FACE_TYPE_TYPE1
,
DWRITE_FONT_FACE_TYPE_VECTOR
,
DWRITE_FONT_FACE_TYPE_BITMAP
,
DWRITE_FONT_FACE_TYPE_UNKNOWN
,
DWRITE_FONT_FACE_TYPE_RAW_CFF
DWRITE_FONT_FACE_TYPE_RAW_CFF
,
DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION
=
DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION
}
DWRITE_FONT_FACE_TYPE
;
typedef
enum
DWRITE_FONT_WEIGHT
...
...
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