Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1d707151
Commit
1d707151
authored
Jun 24, 2002
by
Huw D M Davies
Committed by
Alexandre Julliard
Jun 24, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't map symbol charset through WCToMB.
parent
e75096a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
12 deletions
+65
-12
text.c
dlls/gdi/mfdrv/text.c
+65
-12
No files found.
dlls/gdi/mfdrv/text.c
View file @
1d707151
...
...
@@ -78,24 +78,77 @@ MFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
RECT16
rect16
;
LPINT16
lpdx16
=
NULL
;
BOOL
ret
;
int
i
;
int
i
,
j
;
LPSTR
ascii
;
DWORD
len
;
CHARSETINFO
csi
;
METAFILEDRV_PDEVICE
*
physDev
=
(
METAFILEDRV_PDEVICE
*
)
dev
;
int
charset
=
GetTextCharset
(
physDev
->
hdc
);
UINT
cp
=
CP_ACP
;
if
(
TranslateCharsetInfo
((
DWORD
*
)
charset
,
&
csi
,
TCI_SRCCHARSET
))
cp
=
csi
.
ciACP
;
else
{
switch
(
charset
)
{
case
OEM_CHARSET
:
cp
=
GetOEMCP
();
break
;
case
DEFAULT_CHARSET
:
cp
=
GetACP
();
break
;
case
VISCII_CHARSET
:
case
TCVN_CHARSET
:
case
KOI8_CHARSET
:
case
ISO3_CHARSET
:
case
ISO4_CHARSET
:
case
ISO10_CHARSET
:
case
CELTIC_CHARSET
:
/* FIXME: These have no place here, but because x11drv
enumerates fonts with these (made up) charsets some apps
might use them and then the FIXME below would become
annoying. Now we could pick the intended codepage for
each of these, but since it's broken anyway we'll just
use CP_ACP and hope it'll go away...
*/
cp
=
CP_ACP
;
break
;
default:
FIXME
(
"Can't find codepage for charset %d
\n
"
,
charset
);
break
;
}
}
TRACE
(
"cp == %d
\n
"
,
cp
);
if
(
cp
!=
CP_SYMBOL
)
{
len
=
WideCharToMultiByte
(
cp
,
0
,
str
,
count
,
NULL
,
0
,
NULL
,
NULL
);
ascii
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
cp
,
0
,
str
,
count
,
ascii
,
len
,
NULL
,
NULL
);
}
else
{
len
=
count
;
ascii
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
for
(
i
=
0
;
i
<
count
;
i
++
)
ascii
[
i
]
=
(
BYTE
)(
str
[
i
]
&
0xff
);
}
TRACE
(
"mapped %s -> %s
\n
"
,
debugstr_wn
(
str
,
count
),
debugstr_an
(
ascii
,
len
));
if
(
lpDx
)
lpdx16
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INT16
)
*
count
);
if
(
lprect
)
CONV_RECT32TO16
(
lprect
,
&
rect16
);
if
(
lpdx16
)
for
(
i
=
count
;
i
--
;)
lpdx16
[
i
]
=
lpDx
[
i
];
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
count
,
NULL
,
0
,
NULL
,
NULL
);
ascii
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
count
,
ascii
,
len
,
NULL
,
NULL
);
if
(
lpDx
)
{
lpdx16
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INT16
)
*
len
);
for
(
i
=
j
=
0
;
i
<
len
;
)
if
(
IsDBCSLeadByteEx
(
cp
,
ascii
[
i
]))
{
lpdx16
[
i
++
]
=
lpDx
[
j
++
];
lpdx16
[
i
++
]
=
0
;
}
else
lpdx16
[
i
++
]
=
lpDx
[
j
++
];
}
ret
=
MFDRV_MetaExtTextOut
(
dev
,
x
,
y
,
flags
,
lprect
?&
rect16
:
NULL
,
ascii
,
len
,
lpdx16
);
HeapFree
(
GetProcessHeap
(),
0
,
ascii
);
if
(
lpdx16
)
HeapFree
(
GetProcessHeap
(),
0
,
lpdx16
);
return
ret
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment