dwrite: Update file type and face type enums.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-11-06 00:12:37 +03:00 committed by Alexandre Julliard
parent f7187ecbd6
commit 1e8a706bc3
4 changed files with 12 additions and 10 deletions

View File

@ -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_TRUETYPE_COLLECTION && index)
if (req_facetype != DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION && index)
return E_INVALIDARG;
if (!is_simulation_valid(simulations))

View File

@ -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_TRUETYPE_COLLECTION) ||
(type == DWRITE_FONT_FACE_TYPE_OPENTYPE_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_TRUETYPE_COLLECTION;
*face_type = DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION;
*file_type = DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION;
*face_type = DWRITE_FONT_FACE_TYPE_OPENTYPE_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_TRUETYPE_COLLECTION) {
if (stream_desc->face_type == DWRITE_FONT_FACE_TYPE_OPENTYPE_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);

View File

@ -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_TRUETYPE_COLLECTION, 1, &file, 0,
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION, 1, &file, 0,
DWRITE_FONT_SIMULATIONS_NONE, &fontface);
ok(hr == DWRITE_E_FILEFORMAT || broken(hr == E_FAIL) /* < win10 */, "got 0x%08x\n", hr);

View File

@ -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_TRUETYPE_COLLECTION,
DWRITE_FONT_FILE_TYPE_OPENTYPE_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_TRUETYPE_COLLECTION,
DWRITE_FONT_FACE_TYPE_OPENTYPE_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