Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5c987fc5
Commit
5c987fc5
authored
Jan 13, 2011
by
Kusanagi Kouichi
Committed by
Alexandre Julliard
Jan 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: GetCharABCWidthsA should work for DBCS.
parent
fcb4a161
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
font.c
dlls/gdi32/font.c
+21
-6
font.c
dlls/gdi32/tests/font.c
+0
-1
No files found.
dlls/gdi32/font.c
View file @
5c987fc5
...
...
@@ -2296,18 +2296,33 @@ BOOL WINAPI GetAspectRatioFilterEx( HDC hdc, LPSIZE pAspectRatio )
BOOL
WINAPI
GetCharABCWidthsA
(
HDC
hdc
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
abc
)
{
INT
i
,
wlen
,
count
=
(
INT
)(
lastChar
-
firstChar
+
1
);
INT
i
,
wlen
;
UINT
c
;
LPSTR
str
;
LPWSTR
wstr
;
BOOL
ret
=
TRUE
;
if
(
count
<=
0
)
return
FALSE
;
if
(
lastChar
<
firstChar
)
return
FALSE
;
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
);
for
(
i
=
0
;
i
<
count
;
i
++
)
str
[
i
]
=
(
BYTE
)(
firstChar
+
i
)
;
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lastChar
-
firstChar
+
1
)
*
2
+
1
);
if
(
str
==
NULL
)
return
FALSE
;
wstr
=
FONT_mbtowc
(
hdc
,
str
,
count
,
&
wlen
,
NULL
);
for
(
i
=
0
,
c
=
firstChar
;
c
<=
lastChar
;
i
++
,
c
++
)
{
if
(
c
>
0xff
)
str
[
i
++
]
=
(
BYTE
)(
c
>>
8
);
str
[
i
]
=
(
BYTE
)
c
;
}
str
[
i
]
=
'\0'
;
wstr
=
FONT_mbtowc
(
hdc
,
str
,
-
1
,
&
wlen
,
NULL
);
if
(
wstr
==
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
str
);
return
FALSE
;
}
for
(
i
=
0
;
i
<
wlen
;
i
++
)
{
...
...
dlls/gdi32/tests/font.c
View file @
5c987fc5
...
...
@@ -973,7 +973,6 @@ static void test_GetCharABCWidths(void)
memset
(
a
,
0
,
sizeof
a
);
memset
(
w
,
0
,
sizeof
w
);
hfont
=
SelectObject
(
hdc
,
hfont
);
todo_wine
ok
(
pGetCharABCWidthsA
(
hdc
,
c
[
i
].
a
,
c
[
i
].
a
+
1
,
a
)
&&
pGetCharABCWidthsW
(
hdc
,
c
[
i
].
w
,
c
[
i
].
w
+
1
,
w
)
&&
memcmp
(
a
,
w
,
sizeof
a
)
==
0
,
...
...
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