Hi list,
We have in Israel a lawyer who has cought on to the idea of open source, and is helping "The Cause"(tm) here quite a lot. As part of his activities he is wants to demonstrate a Hebrew law and precedance lookup program at a conference on Dec 2nd using Wine, and he asked for my help.
When trying to run the program, I get the following error: sun@sun:~/c/PD_OR/EXE$ LANG=he_IL wine PDWIN G Could not stat /mnt/fd0 (No such file or directory), ignoring drive A: err:fixup:NE_LoadSegment No implementation for USER.485, setting to 0xdeadbeef err:fixup:NE_LoadSegment No implementation for USER.485, setting to 0xdeadbeef err:fixup:NE_LoadSegment No implementation for USER.485, setting to 0xdeadbeef err:fixup:NE_LoadSegment No implementation for USER.485, setting to 0xdeadbeef err:fixup:NE_LoadSegment No implementation for USER.485, setting to 0xdeadbeef err:fixup:NE_LoadSegment No implementation for USER.485, setting to 0xdeadbeef err:fixup:NE_LoadSegment No implementation for USER.485, setting to 0xdeadbeef err:fixup:NE_LoadSegment No implementation for USER.485, setting to 0xdeadbeef err:fixup:NE_LoadSegment No implementation for USER.491, setting to 0xdeadbeef fixme:win:stub_USER_490 stub fixme:font:CreateScalableFontResourceA (0,"C:\PD_OR\FONTS/AMIR____.FOT","C:\PD_OR\FONTS/AMIR____.TTF",(null)): stub fixme:font:CreateScalableFontResourceA (0,"C:\PD_OR\FONTS/AMIRBLD_.FOT","C:\PD_OR\FONTS/AMIRBLD_.TTF",(null)): stub fixme:dialog:MSGBOX_OnInit task modal msgbox ! Not modal yet.
The application then goes on to display a error message saying (In hebrew) "The fonts for the application could not be found, please reinstall...".
The fonts are indeed available in C:\PD_OR\FONTS as TTF files. It seems the application calls CreateScalableFontResource, and then tries to register the fonts. Copying the TTF fonts to the fonts directory did not solve this problem.
I am looking for some solution, even a workaround, that will solve this problem for me. I have contact with the application's developers, and they are very interested in getting this to work (not interested enough to actually install Linux, but they are interested enough to answer technical questions about the app).
My questions: A. Is there any way I can patch Wine to fool the app into thinking that part succeeds? Or is performing this test necessary, for some strange reason, in order to use the TTF fonts? B. It MAY be possible to ask the developers to actually modify their code to a moderate degree, in order to get this app to work. Is there anything in particular I can ask them? C. Is anyone working on this API? I don't know the first thing about font files and resources, and while I CAN learn, is someone with already existing knowledge can do something about it, it would be much preferable.
Thanks,
Shachar
On Mon, Nov 25, 2002 at 10:27:55PM +0200, Shachar Shemesh wrote:
Hi list,
We have in Israel a lawyer who has cought on to the idea of open source, and is helping "The Cause"(tm) here quite a lot. As part of his activities he is wants to demonstrate a Hebrew law and precedance lookup program at a conference on Dec 2nd using Wine, and he asked for my help.
fixme:font:CreateScalableFontResourceA (0,"C:\PD_OR\FONTS/AMIR____.FOT","C:\PD_OR\FONTS/AMIR____.TTF",(null)): stub fixme:font:CreateScalableFontResourceA (0,"C:\PD_OR\FONTS/AMIRBLD_.FOT","C:\PD_OR\FONTS/AMIRBLD_.TTF",(null)): stub fixme:dialog:MSGBOX_OnInit task modal msgbox ! Not modal yet.
The application then goes on to display a error message saying (In hebrew) "The fonts for the application could not be found, please reinstall...".
The fonts are indeed available in C:\PD_OR\FONTS as TTF files. It seems the application calls CreateScalableFontResource, and then tries to register the fonts. Copying the TTF fonts to the fonts directory did not solve this problem.
I am looking for some solution, even a workaround, that will solve this problem for me. I have contact with the application's developers, and they are very interested in getting this to work (not interested enough to actually install Linux, but they are interested enough to answer technical questions about the app).
My questions: A. Is there any way I can patch Wine to fool the app into thinking that part succeeds? Or is performing this test necessary, for some strange reason, in order to use the TTF fonts? B. It MAY be possible to ask the developers to actually modify their code to a moderate degree, in order to get this app to work. Is there anything in particular I can ask them? C. Is anyone working on this API? I don't know the first thing about font files and resources, and while I CAN learn, is someone with already existing knowledge can do something about it, it would be much preferable.
You could try hacking CreateScalableFontResource to return TRUE. The next thing the app will do is to call AddFontResource using the .FOT filename, this will also fail so you might have to fix the return value for that function too. However if you have the TTF files in c:\windows\fonts then hopefully the app will be happy.
CreateScalableFontResource is on my todo list.
Note that the app is also failing to load some 16bit user functions, so even with the fonts fixed you may have more problems later on...
Huw.
That did not work. Both CreateScalableFontResource and AddFontResource work. The application then goes on to enumerate the fonts, and X11Drv.EnumDeviceFonts fails to detect any "Amir" fonts. Output of +all of relevant part is at the end.
Any idea why?
I will just mention that I am using fonts installed in the windows/Fonts directory.
Also, when investigating the font in pfaedit, it seems all text is defined in the user defined area. I'm not sure what it means. I tried converting the font to a "standard" one, but that did not solve the problem either.
Shachar
Huw D M Davies wrote:
You could try hacking CreateScalableFontResource to return TRUE. The next thing the app will do is to call AddFontResource using the .FOT filename, this will also fail so you might have to fix the return value for that function too. However if you have the TTF files in c:\windows\fonts then hopefully the app will be happy.
CreateScalableFontResource is on my todo list.
Not the problem so far.
Note that the app is also failing to load some 16bit user functions, so even with the fonts fixed you may have more problems later on...
Huw.
080b6888:trace:global:GlobalHandle16 01af 080b6888:Call GDI.330: ENUMFONTFAMILIES(0860,030f40da "Amir",0aaf0008,06b7d86c) ret=030f:070e ds=06b7 080b6888:Call kernel32.lstrcpynA(41472b92,403dba6a "Amir",00000020) ret=409ee486 080b6888:trace:string:lstrcpynA (0x41472b92, "Amir", 32) 080b6888:Ret kernel32.lstrcpynA() retval=41472b92 ret=409ee486 080b6888:Call kernel32._EnterSysLevel(40a1b9a4) ret=409f2e47 080b6888:trace:win32:_EnterSysLevel (0x40a1b9a4, level 3): thread 80b6888 (fs 0287, pid 1061) count before 0 080b6888:trace:win32:_EnterSysLevel (0x40a1b9a4, level 3): thread 80b6888 (fs 0287, pid 1061) count after 1 080b6888:Ret kernel32._EnterSysLevel() retval=0000006d ret=409f2e47 080b6888:trace:gdi:GDI_GetObjPtr (0x860): enter 1 080b6888:Call kernel32.MultiByteToWideChar(00000000,00000000,41472b92 "Amir",ffffffff,414729fc,00000020) ret=409ed821 080b6888:Ret kernel32.MultiByteToWideChar() retval=00000005 ret=409ed821 080b6888:Call kernel32.MapLS(41472af0) ret=409ee256 080b6888:Ret kernel32.MapLS() retval=09d72af0 ret=409ee256 080b6888:Call kernel32.MapLS(41472a3c) ret=409ee25f 080b6888:Ret kernel32.MapLS() retval=09d72a3c ret=409ee25f 080b6888:Call x11drv.EnumDeviceFonts(4149f1b0,414729e0,409ee02c,41472b34) ret=409ee27f 080b6888:Ret x11drv.EnumDeviceFonts() retval=00000000 ret=409ee27f 080b6888:Call kernel32.UnMapLS(09d72af0) ret=409ee28e 080b6888:Ret kernel32.UnMapLS() retval=00000001 ret=409ee28e 080b6888:Call kernel32.UnMapLS(09d72a3c) ret=409ee296 080b6888:Ret kernel32.UnMapLS() retval=00000001 ret=409ee296 080b6888:trace:gdi:GDI_ReleaseObj (0x860): leave 1 080b6888:Call kernel32._LeaveSysLevel(40a1b9a4) ret=409f2fe3 080b6888:trace:win32:_LeaveSysLevel (0x40a1b9a4, level 3): thread 80b6888 (fs 0287, pid 1061) count before 1 080b6888:trace:win32:_LeaveSysLevel (0x40a1b9a4, level 3): thread 80b6888 (fs 0287, pid 1061) count after 0 080b6888:Ret kernel32._LeaveSysLevel() retval=0000006d ret=409f2fe3 080b6888:trace:global:GlobalHandle16 01af 080b6888:Ret GDI.330: ENUMFONTFAMILIES() retval=0000 ret=030f:070e ds=06b7 080b6888:trace:global:GlobalHandle16 0137
On Tue, Nov 26, 2002 at 08:28:57PM +0200, Shachar Shemesh wrote:
That did not work. Both CreateScalableFontResource and AddFontResource work. The application then goes on to enumerate the fonts, and X11Drv.EnumDeviceFonts fails to detect any "Amir" fonts. Output of +all of relevant part is at the end.
Any idea why?
Yup, EnumFonts16 is broken. Could you give this untested patch a go?
Huw.
On Tuesday 26 November 2002 21:15, Huw D M Davies wrote:
On Tue, Nov 26, 2002 at 08:28:57PM +0200, Shachar Shemesh wrote:
That did not work. Both CreateScalableFontResource and AddFontResource work. The application then goes on to enumerate the fonts, and X11Drv.EnumDeviceFonts fails to detect any "Amir" fonts. Output of +all of relevant part is at the end.
Any idea why?
Yup, EnumFonts16 is broken. Could you give this untested patch a go?
I have tested the patch and it does fixes a problem in a win16 app. It always popped up dialog boxes to report that they do not exist. But since it has used them, I never bothered enough to report.
Regards Zsolt
Huw D M Davies wrote:
On Tue, Nov 26, 2002 at 08:28:57PM +0200, Shachar Shemesh wrote:
That did not work. Both CreateScalableFontResource and AddFontResource work. The application then goes on to enumerate the fonts, and X11Drv.EnumDeviceFonts fails to detect any "Amir" fonts. Output of +all of relevant part is at the end.
Any idea why?
Yup, EnumFonts16 is broken. Could you give this untested patch a go?
Huw.
Works great for me. Thanks!!
Is there any chance you'll submit the official fix to be included by the time we have to present the software (Monday - Sunday evening if you are in the US, as we are ahead of the US). I would like to be able to say that "this is the out of the box Wine".
Shachar
Index: objects/font.c
RCS file: /home/wine/wine/objects/font.c,v retrieving revision 1.93 diff -u -r1.93 font.c --- objects/font.c 25 Nov 2002 21:09:49 -0000 1.93 +++ objects/font.c 26 Nov 2002 20:11:51 -0000 @@ -71,6 +71,7 @@ LPENUMLOGFONTEX16 lpLogFont; SEGPTR segTextMetric; SEGPTR segLogFont;
- DWORD dwFlags; HDC hdc; DC *dc; PHYSDEV physDev;
@@ -524,6 +525,7 @@ { FONT_EnumLogFontExWTo16(plf, pfe->lpLogFont); FONT_NewTextMetricExWTo16(ptm, pfe->lpTextMetric);
pfe->dwFlags |= ENUM_CALLED; GDI_ReleaseObj( pfe->hdc ); /* release the GDI lock */ ret = FONT_CallTo16_word_llwl( pfe->lpEnumFunc, pfe->segLogFont, pfe->segTextMetric,
@@ -590,36 +592,49 @@ DWORD dwFlags) { fontEnum16 fe16;
- INT16 retVal = 0;
INT16 ret = 1, ret2; DC* dc = DC_GetDCPtr( HDC_32(hDC) );
NEWTEXTMETRICEX16 tm16;
ENUMLOGFONTEX16 lf16;
LOGFONTW lfW;
BOOL enum_gdi_fonts;
if (!dc) return 0;
FONT_LogFont16ToW(plf, &lfW);
fe16.hdc = HDC_32(hDC); fe16.dc = dc; fe16.physDev = dc->physDev;
fe16.lpLogFontParam = plf;
fe16.lpEnumFunc = efproc;
fe16.lpData = lParam;
fe16.lpTextMetric = &tm16;
fe16.lpLogFont = &lf16;
fe16.segTextMetric = MapLS( &tm16 );
fe16.segLogFont = MapLS( &lf16 );
fe16.dwFlags = 0;
enum_gdi_fonts = GetDeviceCaps16(hDC, TEXTCAPS) & TC_VA_ABLE;
- if (dc->funcs->pEnumDeviceFonts)
- if (!dc->funcs->pEnumDeviceFonts && !enum_gdi_fonts) {
NEWTEXTMETRICEX16 tm16;
ENUMLOGFONTEX16 lf16;
LOGFONTW lfW;
FONT_LogFont16ToW(plf, &lfW);
fe16.lpLogFontParam = plf;
fe16.lpEnumFunc = efproc;
fe16.lpData = lParam;
fe16.lpTextMetric = &tm16;
fe16.lpLogFont = &lf16;
fe16.segTextMetric = MapLS( &tm16 );
fe16.segLogFont = MapLS( &lf16 );
retVal = dc->funcs->pEnumDeviceFonts( dc->physDev, &lfW,
FONT_EnumInstance16, (LPARAM)&fe16 );
UnMapLS( fe16.segTextMetric );
UnMapLS( fe16.segLogFont );
ret = 0;
}goto done;
- if (enum_gdi_fonts)
ret = WineEngEnumFonts( &lfW, FONT_EnumInstance16, (LPARAM)&fe16 );
- fe16.dwFlags &= ~ENUM_CALLED;
- if (ret && dc->funcs->pEnumDeviceFonts) {
- ret2 = dc->funcs->pEnumDeviceFonts( dc->physDev, &lfW, FONT_EnumInstance16, (LPARAM)&fe16 );
- if(fe16.dwFlags & ENUM_CALLED) /* update ret iff a font gets enumed */
ret = ret2;
- }
+done:
- UnMapLS( fe16.segTextMetric );
- UnMapLS( fe16.segLogFont ); if (fe16.hdc) GDI_ReleaseObj( fe16.hdc );
- return retVal;
- return ret;
}
/***********************************************************************
On Wed, Nov 27, 2002 at 07:08:08PM +0200, Shachar Shemesh wrote:
Works great for me. Thanks!!
Is there any chance you'll submit the official fix to be included by the time we have to present the software (Monday - Sunday evening if you are in the US, as we are ahead of the US). I would like to be able to say that "this is the out of the box Wine".
I've sent the EnumFont16 fix off to wine-patches.
Huw.
Huw D M Davies wrote:
On Wed, Nov 27, 2002 at 07:08:08PM +0200, Shachar Shemesh wrote:
Works great for me. Thanks!!
Is there any chance you'll submit the official fix to be included by the time we have to present the software (Monday - Sunday evening if you are in the US, as we are ahead of the US). I would like to be able to say that "this is the out of the box Wine".
I've sent the EnumFont16 fix off to wine-patches.
Huw.
Thanks.
I will test the patch tonight.
I will just mention that I got permission to give the fonts in question to the subscribers of this list for the purpose of making this app work. It's useful when the person most interested in this app on Linux is the copyright holder's lawer..... :-)
Anyone who thinks having the actual Font will help is encouraged to contact me via email, and I'll send it.
On a related note - though I couldn't use the font from Wine in an unrelated app, I could use it in Windows. There is one, possibly important, difference, however. While in Wine I installed the font, on Windows I opened my test app while the other app was running (and thus - exporting the font).
Shachar
Shachar Shemesh wrote:
That did not work. Both CreateScalableFontResource and AddFontResource work. The application then goes on to enumerate the fonts, and X11Drv.EnumDeviceFonts fails to detect any "Amir" fonts. Output of +all of relevant part is at the end.
Any idea why?
I will just mention that I am using fonts installed in the windows/Fonts directory.
Also, when investigating the font in pfaedit, it seems all text is defined in the user defined area. I'm not sure what it means. I tried converting the font to a "standard" one, but that did not solve the problem either.
Shachar
Huw D M Davies wrote:
You could try hacking CreateScalableFontResource to return TRUE. The next thing the app will do is to call AddFontResource using the .FOT filename, this will also fail so you might have to fix the return value for that function too. However if you have the TTF files in c:\windows\fonts then hopefully the app will be happy.
CreateScalableFontResource is on my todo list.
Not the problem so far.
Note that the app is also failing to load some 16bit user functions, so even with the fonts fixed you may have more problems later on...
Huw.
080b6888:trace:global:GlobalHandle16 01af 080b6888:Call GDI.330: ENUMFONTFAMILIES(0860,030f40da "Amir",0aaf0008,06b7d86c) ret=030f:070e ds=06b7 080b6888:Call kernel32.lstrcpynA(41472b92,403dba6a "Amir",00000020) ret=409ee486 080b6888:trace:string:lstrcpynA (0x41472b92, "Amir", 32) 080b6888:Ret kernel32.lstrcpynA() retval=41472b92 ret=409ee486 080b6888:Call kernel32._EnterSysLevel(40a1b9a4) ret=409f2e47 080b6888:trace:win32:_EnterSysLevel (0x40a1b9a4, level 3): thread 80b6888 (fs 0287, pid 1061) count before 0 080b6888:trace:win32:_EnterSysLevel (0x40a1b9a4, level 3): thread 80b6888 (fs 0287, pid 1061) count after 1 080b6888:Ret kernel32._EnterSysLevel() retval=0000006d ret=409f2e47 080b6888:trace:gdi:GDI_GetObjPtr (0x860): enter 1 080b6888:Call kernel32.MultiByteToWideChar(00000000,00000000,41472b92 "Amir",ffffffff,414729fc,00000020) ret=409ed821 080b6888:Ret kernel32.MultiByteToWideChar() retval=00000005 ret=409ed821 080b6888:Call kernel32.MapLS(41472af0) ret=409ee256 080b6888:Ret kernel32.MapLS() retval=09d72af0 ret=409ee256 080b6888:Call kernel32.MapLS(41472a3c) ret=409ee25f 080b6888:Ret kernel32.MapLS() retval=09d72a3c ret=409ee25f 080b6888:Call x11drv.EnumDeviceFonts(4149f1b0,414729e0,409ee02c,41472b34) ret=409ee27f 080b6888:Ret x11drv.EnumDeviceFonts() retval=00000000 ret=409ee27f 080b6888:Call kernel32.UnMapLS(09d72af0) ret=409ee28e 080b6888:Ret kernel32.UnMapLS() retval=00000001 ret=409ee28e 080b6888:Call kernel32.UnMapLS(09d72a3c) ret=409ee296 080b6888:Ret kernel32.UnMapLS() retval=00000001 ret=409ee296 080b6888:trace:gdi:GDI_ReleaseObj (0x860): leave 1 080b6888:Call kernel32._LeaveSysLevel(40a1b9a4) ret=409f2fe3 080b6888:trace:win32:_LeaveSysLevel (0x40a1b9a4, level 3): thread 80b6888 (fs 0287, pid 1061) count before 1 080b6888:trace:win32:_LeaveSysLevel (0x40a1b9a4, level 3): thread 80b6888 (fs 0287, pid 1061) count after 0 080b6888:Ret kernel32._LeaveSysLevel() retval=0000006d ret=409f2fe3 080b6888:trace:global:GlobalHandle16 01af 080b6888:Ret GDI.330: ENUMFONTFAMILIES() retval=0000 ret=030f:070e ds=06b7 080b6888:trace:global:GlobalHandle16 0137