mirror of
https://github.com/reactos/wine.git
synced 2025-02-27 08:15:36 +00:00
dwrite: Implement another CreateFontFace() variant.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e30607fdb0
commit
bf211623fd
@ -1496,18 +1496,11 @@ static HRESULT WINAPI dwritefont_HasCharacter(IDWriteFont3 *iface, UINT32 value,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dwritefont_CreateFontFace(IDWriteFont3 *iface, IDWriteFontFace **face)
|
||||
static HRESULT WINAPI dwritefont_CreateFontFace(IDWriteFont3 *iface, IDWriteFontFace **fontface)
|
||||
{
|
||||
struct dwrite_font *This = impl_from_IDWriteFont3(iface);
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, face);
|
||||
|
||||
hr = get_fontface_from_font(This, (IDWriteFontFace3**)face);
|
||||
if (hr == S_OK)
|
||||
IDWriteFontFace_AddRef(*face);
|
||||
|
||||
return hr;
|
||||
TRACE("(%p)->(%p)\n", This, fontface);
|
||||
return IDWriteFont3_CreateFontFace(iface, (IDWriteFontFace3**)fontface);
|
||||
}
|
||||
|
||||
static void WINAPI dwritefont1_GetMetrics(IDWriteFont3 *iface, DWRITE_FONT_METRICS1 *metrics)
|
||||
@ -1572,8 +1565,15 @@ static BOOL WINAPI dwritefont2_IsColorFont(IDWriteFont3 *iface)
|
||||
static HRESULT WINAPI dwritefont3_CreateFontFace(IDWriteFont3 *iface, IDWriteFontFace3 **fontface)
|
||||
{
|
||||
struct dwrite_font *This = impl_from_IDWriteFont3(iface);
|
||||
FIXME("(%p)->(%p): stub\n", This, fontface);
|
||||
return E_NOTIMPL;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, fontface);
|
||||
|
||||
hr = get_fontface_from_font(This, fontface);
|
||||
if (hr == S_OK)
|
||||
IDWriteFontFace3_AddRef(*fontface);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static BOOL WINAPI dwritefont3_Equals(IDWriteFont3 *iface, IDWriteFont *font)
|
||||
|
@ -6177,17 +6177,19 @@ todo_wine
|
||||
|
||||
/* references returned from IDWriteFontFace3 */
|
||||
hr = IDWriteFont3_CreateFontFace(font3, &fontface);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IDWriteFontFace3_GetFontFaceReference(fontface, &ref);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
if (hr == S_OK) {
|
||||
hr = IDWriteFontFace3_GetFontFaceReference(fontface, &ref);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IDWriteFontFace3_GetFontFaceReference(fontface, &ref1);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
if (hr == S_OK)
|
||||
ok(ref == ref1, "got %p, %p\n", ref1, ref);
|
||||
|
||||
if (hr == S_OK) {
|
||||
hr = IDWriteFontFaceReference_CreateFontFace(ref, &fontface1);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(fontface1 == fontface, "got %p, %p\n", fontface1, fontface);
|
||||
@ -6195,9 +6197,8 @@ if (hr == S_OK) {
|
||||
|
||||
IDWriteFontFaceReference_Release(ref);
|
||||
IDWriteFontFaceReference_Release(ref1);
|
||||
|
||||
IDWriteFontFace3_Release(fontface);
|
||||
}
|
||||
IDWriteFontFace3_Release(fontface);
|
||||
IDWriteFont3_Release(font3);
|
||||
|
||||
IDWriteFactory3_Release(factory3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user