Paul Gofman gofmanp@gmail.com writes:
Signed-off-by: Paul Gofman gofmanp@gmail.com
The motivation under this patch is fixing the crash in Halo Online which originates from libcef.dll with Wine Staging. The crash scenario is the following. A staging patch puts a 'Times New Roman' font replacement to <datadir>/fonts/times.ttf. This is the only relevant difference introduced by Staging. When the font file is found there, gdi32 uses wine_get_data_dir() for a directory prefix to construct font file name. Later libcef.dll works with fonts through dwrite, and somehow gets confused by a "\\..\\" inside the font file name which it gets with IDWriteLocalFontFileLoader_GetFilePathFromKey() from system font file enumerator object. A minimally sufficient fix for that is to collapse the font file name in create_local_file_reference() or right in localfontfileloader_GetFilePathFromKey() in dwrite/font.c. But it probably makes sense to have the paths in registry free of spurious "\\..\\" as these values are also exposed to applications.
It should be done in the places that expose the paths to the app, using existing Win32 APIs like GetFullPathName().