Commit 99b33074 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

Ensure we free the cached HFONT after loading in a fresh font. Enables

fonts in VB programs to appear correctly.
parent ac90ba9b
......@@ -995,6 +995,7 @@ static HRESULT WINAPI OLEFontImpl_Clone(
GetProcessHeap(),0,
(1+strlenW(this->description.lpstrName))*2
);
strcpyW(newObject->description.lpstrName, this->description.lpstrName);
/* We need to clone the HFONT too. This is just cut & paste from above */
IFont_get_Size(iface, &cySize);
......@@ -1423,6 +1424,10 @@ static HRESULT WINAPI OLEFontImpl_Load(
MultiByteToWideChar( CP_ACP, 0, readBuffer, bStringSize, this->description.lpstrName, len );
this->description.lpstrName[len] = 0;
/* Ensure use of this font causes a new one to be created @@@@ */
DeleteObject(this->gdiFont);
this->gdiFont = 0;
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment