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
4d7655a8
Commit
4d7655a8
authored
May 13, 2006
by
qingdoa daoo
Committed by
Alexandre Julliard
May 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi: Duplicate extent value for the second byte of a DBCS char.
parent
7ed7e8fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
font.c
dlls/gdi/font.c
+20
-2
No files found.
dlls/gdi/font.c
View file @
4d7655a8
...
...
@@ -1144,10 +1144,28 @@ BOOL WINAPI GetTextExtentExPointA( HDC hdc, LPCSTR str, INT count,
{
BOOL
ret
;
INT
wlen
;
LPWSTR
p
=
FONT_mbtowc
(
str
,
count
,
&
wlen
);
ret
=
GetTextExtentExPointW
(
hdc
,
p
,
wlen
,
maxExt
,
lpnFit
,
alpDx
,
size
);
INT
*
walpDx
=
NULL
;
LPWSTR
p
=
NULL
;
if
(
alpDx
&&
NULL
==
(
walpDx
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
INT
))))
return
FALSE
;
p
=
FONT_mbtowc
(
str
,
count
,
&
wlen
);
ret
=
GetTextExtentExPointW
(
hdc
,
p
,
wlen
,
maxExt
,
lpnFit
,
walpDx
,
size
);
if
(
walpDx
)
{
INT
n
=
lpnFit
?
*
lpnFit
:
wlen
;
INT
i
,
j
;
for
(
i
=
0
,
j
=
0
;
i
<
n
;
i
++
,
j
++
)
{
alpDx
[
j
]
=
walpDx
[
i
];
if
(
IsDBCSLeadByte
(
str
[
j
]))
alpDx
[
++
j
]
=
walpDx
[
i
];
}
}
if
(
lpnFit
)
*
lpnFit
=
WideCharToMultiByte
(
CP_ACP
,
0
,
p
,
*
lpnFit
,
NULL
,
0
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
p
);
HeapFree
(
GetProcessHeap
(),
0
,
walpDx
);
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