[Bug 7023] New: GetCharWidth implementation proposed improvements

Wine Bugs wine-bugs at winehq.org
Thu Dec 28 01:28:28 CST 2006


           Summary: GetCharWidth implementation proposed improvements
           Product: Wine
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-gdi-(printing)
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: richardvoigt at gmail.com

I've got a game missing a lot of text because of repeatedly hitting stubs for
GetCharWidthI, so I thought I'd try to implement it.  This bug is for me to ask
questions about the wine font engine, and my eventual patch.

First up, is it just me, or is the complexity of GetCharWidth32A totally
pointless?  Since every character is cast to (BYTE), it's restricted to
single-byte characters, which makes the memory allocation, string building, and
call to FONT_mbtowc all of no benefit, because all 8-bit characters map directly
into UNICODE... or no?

I think the whole body of GetCharWidth32A can be replaced by
BOOL WINAPI GetCharWidth32A( HDC hdc, UINT firstChar, UINT lastChar,
                               LPINT buffer )
  return GetCharWidth32W(hdc, (BYTE)firstChar, (BYTE)lastChar, buffer);

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the wine-bugs mailing list