https://bugs.winehq.org/show_bug.cgi?id=38796
--- Comment #1 from Bernhard Übelacker bernhardu@vr-web.de --- In this test the call to create_fontface comes down to systemfontfileenumerator_GetCurrentFontFile.
There it calls RegEnumValueW to enumerate the fonts in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts. With two calls, one for getting the required buffer length, one to retrieve the content.
In my case the font "Tahoma Bold" has value which is 109 characters long. (I probably have too many subdirectories and the value is generated from drive Z:)
Unfortunately the first call to RegEnumValueW calls NtEnumerateValueKey just with an fixed buffer and returns with a too low needed buffer size.
Then the second call to RegEnumValueW also fails with the too small buffer.
Attached patch changes RegEnumValueW to retrieve the correct needed buffer size.