https://bugs.winehq.org/show_bug.cgi?id=57238
--- Comment #13 from Hans Leidekker hans@meelstraat.net --- (In reply to Artem S. Tashkinov from comment #12)
AFAIK Wine has wrappers for most Windows functions, so wouldn't it be just the case of
winAPI_fopen(file) { if (string(file) ~= "C:\windows\fonts*.ttf" && !file_exist(file) ) { fontname = strip ( string(file), "C:\windows\fonts"); if file_exists(strcat("/usr/share/fonts", fontname)) file=fopen(strcat("/usr/share/fonts", fontname)); } }
Sounds trivial to me and I'm sure something like that has already been done in Wine and used in many places.
We don't want to check every file open to see if it's a font under c:\windows\fonts. System fonts may also be found other places.