dwrite: Layout can't be created without text format.
This commit is contained in:
parent
1b449f459f
commit
fcae48a08c
@ -681,14 +681,11 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *forma
|
|||||||
memset(&This->format, 0, sizeof(This->format));
|
memset(&This->format, 0, sizeof(This->format));
|
||||||
|
|
||||||
/* reference is not kept here, instead copy all underlying data */
|
/* reference is not kept here, instead copy all underlying data */
|
||||||
if (format)
|
IDWriteTextFormat_GetFontCollection(format, &This->format.collection);
|
||||||
{
|
This->format.weight = IDWriteTextFormat_GetFontWeight(format);
|
||||||
IDWriteTextFormat_GetFontCollection(format, &This->format.collection);
|
This->format.style = IDWriteTextFormat_GetFontStyle(format);
|
||||||
This->format.weight = IDWriteTextFormat_GetFontWeight(format);
|
This->format.stretch = IDWriteTextFormat_GetFontStretch(format);
|
||||||
This->format.style = IDWriteTextFormat_GetFontStyle(format);
|
This->format.size = IDWriteTextFormat_GetFontSize(format);
|
||||||
This->format.stretch = IDWriteTextFormat_GetFontStretch(format);
|
|
||||||
This->format.size = IDWriteTextFormat_GetFontSize(format);
|
|
||||||
}
|
|
||||||
|
|
||||||
*layout = &This->IDWriteTextLayout_iface;
|
*layout = &This->IDWriteTextLayout_iface;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user