"Byeong-Sik Jeon" wjsqudtlr@gmail.com wrote:
These patches fix the BUG #5865 http://bugs.winehq.org/show_bug.cgi?id=5865.
changelog: Implement AddFontMemResourceEx.
You shouldn't need to create a temp file, FT_New_Memory_Face is able to load font data from memory just fine. FT_New_Memory_Face is already used by OpenFontFile, you need to adapt existing code to not require fonts to be passed as a file name in general.
Dmitry Timoshkov wrote:
"Byeong-Sik Jeon" wjsqudtlr@gmail.com wrote:
These patches fix the BUG #5865 http://bugs.winehq.org/show_bug.cgi?id=5865.
changelog: Implement AddFontMemResourceEx.
You shouldn't need to create a temp file, FT_New_Memory_Face is able to load font data from memory just fine. FT_New_Memory_Face is already used by OpenFontFile, you need to adapt existing code to not require fonts to be passed as a file name in general.
FT_New_Memory_Face approach need to change the AddFontFileToList, OpenFontFile function. this change makes the complicated code, but "memory font resource" only need for Add/RemoveFontMemResourceEx api. I think temp file approach is simple solution.
#34 patch code of BUG#5865 already use the FT_New_Memory_Face approach. please see the #34 patch code.
PS. #34 code must fix. RemoveFontMemResourceEx of #34 patch code has the critical problem.
"Byeong-Sik Jeon" wjsqudtlr@gmail.com wrote:
FT_New_Memory_Face approach need to change the AddFontFileToList, OpenFontFile function. this change makes the complicated code,
Yes, it needs more work, but will simplify the whole font loading code once done properly.
but "memory font resource" only need for Add/RemoveFontMemResourceEx api. I think temp file approach is simple solution.
It's simple, but it's wrong.