Proposed patch for "fonts.c"
NoteWorthy Online
online at noteworthysoftware.com
Thu Jan 11 08:09:00 CST 2007
This is a proposed fix.
Problem: In Wine GDI text handling, strings are incorrectly converted using
the wrong code page when the current font uses Symbol encoding.
Fix: Change function "FONT_mbtowc" to use the CP_SYMBOL code page when the
text uses Symbol encoding.
Tested with: wine-0.9.28
Attached: A "diff -u" of "fonts.c" is attached.
For more: http://my.noteworthysoftware.com/?topic=5837
Regards,
Eric,
http://noteworthysoftware.com
----- Original Message -----
From: "Bernard Choppy" <bernard at choppy.fr>
To: <wine-patches at winehq.org>
Cc: <online at noteworthysoftware.com>
Sent: Monday, January 08, 2007 5:49 PM
Subject: Proposed patch for "fonts.c"
> Good day,
>
> online at noteworthysoftware.com sent a patch covering bug 7040 I've
> initiated.
>
> The problem is that wine doesn't handle properly Symbol-encoded fonts,
> which makes rendering of special fonts (in this case, music notation for
> the NoteWorthy version 2 softwares) inaccurate.
>
> I suppose he will sent this patch too, but to make sure, please find it
> here.
>
>
> 352c352
> < static LPWSTR FONT_mbtowc(LPCSTR str, INT count, INT *plenW)
> ---
> > static LPWSTR FONT_mbtowc(HDC hdc, LPCSTR str, INT count, INT *plenW)
> 354c354
> < UINT cp = CP_ACP;
> ---
> > UINT cp = (GetTextCharset(hdc) == SYMBOL_CHARSET) ? CP_SYMBOL :
> CP_ACP;
> 1025c1025
> < LPWSTR p = FONT_mbtowc(str, count, &wlen);
> ---
> > LPWSTR p = FONT_mbtowc(hdc, str, count, &wlen);
> 1134c1134
> < p = FONT_mbtowc(str, count, &wlen);
> ---
> > p = FONT_mbtowc(hdc, str, count, &wlen);
> 1651c1651
> < wstr = FONT_mbtowc(str, count, &wlen);
> ---
> > wstr = FONT_mbtowc(hdc, str, count, &wlen);
> 1686c1686
> < p = FONT_mbtowc(str, count, &wlen);
> ---
> > p = FONT_mbtowc(hdc, str, count, &wlen);
> 2298c2298
> < wstr = FONT_mbtowc(str, count, &wlen);
> ---
> > wstr = FONT_mbtowc(hdc, str, count, &wlen);
> 2436c2436
> < p = FONT_mbtowc(mbchs, len, NULL);
> ---
> > p = FONT_mbtowc(hdc, mbchs, len, NULL);
> 2742c2742
> < lpstrW = FONT_mbtowc(lpstr, count, &countW);
> ---
> > lpstrW = FONT_mbtowc(hdc, lpstr, count, &countW);
> 2794c2794
> < lpStringW = FONT_mbtowc(lpString, uCount, &uCountW);
> ---
> > lpStringW = FONT_mbtowc(hdc, lpString, uCount, &uCountW);
> 2934c2934
> < wstr = FONT_mbtowc(str, count, &wlen);
> ---
> > wstr = FONT_mbtowc(hdc, str, count, &wlen);
>
>
>
> Cordialement,
> --
> Bernard Choppy
> <bernard at choppy.fr>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: font.diff
Type: application/octet-stream
Size: 2942 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070111/9c4a3e83/font.obj
More information about the wine-patches
mailing list