Dmitry Timoshkov wrote:

<snippage AdH>

> Of course, I can :-). ExtTextOutA at wine/objects/text.c takes non-unicode
> text and translates it to unicode using wrong code page. That's all.
> The used code page will be always wrong, if currently selected font will have
> another code page rather then current ANSI code page. Theoretically, the system
> could have fonts with three different code pages: ANSI, OEM, MAC. I have even more
> in addition to the mentioned ones: iso8859-1, iso8859-5, koi8-r, symbol. In my case
> ANSI = 1251, OEM = 866, MAC = 10007. So, the question: Can the fonts with the
> different code pages easy break everything?!

Oh yes!  Try using a symbol font like 
"-adobe-symbol-medium-r-normal--14-140-75-75-p-85-adobe-fontspecific" and scanning 
GetTextExtentPoint calls through it from FirstChar to LastChar.  WordPerfect
likes to do this every time the user selects a new font and wine crashes in 
X11DRV_GetTextExtentPoint on a pointer lookup of the "translated" character encoding 
determined by MultiByteToWideChar.

I figure the following fixme is a symptom of my problem:

fixme:string:MultiByteToWideChar MB_COMPOSITE not supported

and here is the code in graphics/x11drv/text.c that is abused by the "mapping":

413                     x += pfo->fs->per_char ? 
414                pfo->fs->per_char[str[i] - pfo->fs->min_char_or_byte2].attributes : 
415                pfo->fs->min_bounds.attributes;


> >Maybe the problem is that we should always try to use the right font
> >charset for the current codepage unless specified explicitly?  Would a
> >patch like this improve the situation?
> 
> Unfortunately, the problem persist.

Same here.  Do we properly track if the X font says its encoding is fontspecific?  
(this is new stuff for me..)

--
Albert den Haan, Lead Developer @ Linux Port Team . Corel Corporation
[EMAIL PROTECTED]   x 5318
-- 
The address in the headers is not the poster's real email address.  Do not send
private mail to the poster using your mailer's "reply" feature.  CC's of mail 
to mailing lists are OK.  Problem reports to "[EMAIL PROTECTED]".  
The poster's email address is "[EMAIL PROTECTED]".

Reply via email to