mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-20 14:38:57 +00:00
dwrite: Return CreateStreamFromKey() failure code from Analyze().
This commit is contained in:
parent
8abed244a2
commit
9ec6fd85c4
|
@ -1715,10 +1715,12 @@ HRESULT create_font_collection(IDWriteFactory2* factory, IDWriteFontFileEnumerat
|
|||
if (FAILED(hr))
|
||||
break;
|
||||
|
||||
/* failed font files are skipped */
|
||||
hr = IDWriteFontFile_Analyze(file, &supported, &file_type, &face_type, &face_count);
|
||||
if (FAILED(hr) || !supported || face_count == 0) {
|
||||
TRACE("unsupported font (0x%08x, %d, %u)\n", hr, supported, face_count);
|
||||
TRACE("unsupported font (%p, 0x%08x, %d, %u)\n", file, hr, supported, face_count);
|
||||
IDWriteFontFile_Release(file);
|
||||
hr = S_OK;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2080,7 +2082,7 @@ static HRESULT WINAPI dwritefontfile_Analyze(IDWriteFontFile *iface, BOOL *isSup
|
|||
|
||||
hr = IDWriteFontFileLoader_CreateStreamFromKey(This->loader, This->reference_key, This->key_size, &stream);
|
||||
if (FAILED(hr))
|
||||
return S_OK;
|
||||
return hr;
|
||||
|
||||
hr = opentype_analyze_font(stream, numberOfFaces, fontFileType, fontFaceType, isSupportedFontType);
|
||||
|
||||
|
|
|
@ -1814,15 +1814,14 @@ static void test_CreateCustomFontFileReference(void)
|
|||
face_type = DWRITE_FONT_FACE_TYPE_TRUETYPE;
|
||||
support = TRUE;
|
||||
count = 1;
|
||||
IDWriteFontFile_Analyze(file, &support, &file_type, &face_type, &count);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
hr = IDWriteFontFile_Analyze(file, &support, &file_type, &face_type, &count);
|
||||
ok(hr == 0x8faecafe, "got 0x%08x\n", hr);
|
||||
ok(support == FALSE, "got %i\n", support);
|
||||
ok(file_type == DWRITE_FONT_FILE_TYPE_UNKNOWN, "got %i\n", file_type);
|
||||
ok(face_type == DWRITE_FONT_FACE_TYPE_UNKNOWN, "got %i\n", face_type);
|
||||
ok(count == 0, "got %i\n", count);
|
||||
|
||||
hr = IDWriteFactory_CreateFontFace(factory, DWRITE_FONT_FACE_TYPE_CFF, 1, &file, 0, 0, &face);
|
||||
todo_wine
|
||||
ok(hr == 0x8faecafe, "got 0x%08x\n", hr);
|
||||
IDWriteFontFile_Release(file);
|
||||
|
||||
|
|
Loading…
Reference in a new issue