On Tue Feb 28 19:18:32 2023 +0000, w-flo wrote:
I can give that a try, yes. (First open the file in the test code, then call the font loading function on the same file.)
I noticed the "test_long_name()" test already tests a few different things related to GdipPrivateAddFontFile(), so I modified the test a bit to trigger the bug. I could also extract/copy that part of it to its own test function if that is preferred.
I added a "if GdipPrivateAddFontFile() fails (probably due to the sharing violation), try again after closing the file handle" so the other tests in that function continue to work on older wine versions. I'm not sure if that is a good thing or not.