dwrite: Layout can't be created without text format.

This commit is contained in:
Nikolay Sivov 2012-10-26 12:10:47 -04:00 committed by Alexandre Julliard
parent 1b449f459f
commit fcae48a08c
1 changed files with 5 additions and 8 deletions

View File

@ -681,14 +681,11 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *forma
memset(&This->format, 0, sizeof(This->format));
/* reference is not kept here, instead copy all underlying data */
if (format)
{
IDWriteTextFormat_GetFontCollection(format, &This->format.collection);
This->format.weight = IDWriteTextFormat_GetFontWeight(format);
This->format.style = IDWriteTextFormat_GetFontStyle(format);
This->format.stretch = IDWriteTextFormat_GetFontStretch(format);
This->format.size = IDWriteTextFormat_GetFontSize(format);
}
IDWriteTextFormat_GetFontCollection(format, &This->format.collection);
This->format.weight = IDWriteTextFormat_GetFontWeight(format);
This->format.style = IDWriteTextFormat_GetFontStyle(format);
This->format.stretch = IDWriteTextFormat_GetFontStretch(format);
This->format.size = IDWriteTextFormat_GetFontSize(format);
*layout = &This->IDWriteTextLayout_iface;