Help needed - CreateScalableFontResource

Huw D M Davies h.davies1 at
Mon Nov 25 15:15:52 CST 2002

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 
> 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...


More information about the wine-devel mailing list