mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
Ensure we free the cached HFONT after loading in a fresh font. Enables
fonts in VB programs to appear correctly.
This commit is contained in:
parent
ac90ba9bce
commit
99b3307406
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user