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
f8125a98
Commit
f8125a98
authored
Jan 16, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi: better implementation for GetCharABCWidthsFloat{A,W}.
parent
00577aa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
8 deletions
+70
-8
font.c
dlls/gdi/font.c
+70
-8
No files found.
dlls/gdi/font.c
View file @
f8125a98
...
...
@@ -2785,22 +2785,84 @@ GetCharacterPlacementW(
/*************************************************************************
* GetCharABCWidthsFloatA [GDI32.@]
*
* See GetCharABCWidthsFloatW.
*/
BOOL
WINAPI
GetCharABCWidthsFloatA
(
HDC
hdc
,
UINT
iFirstChar
,
UINT
iLastChar
,
LPABCFLOAT
lpABCF
)
BOOL
WINAPI
GetCharABCWidthsFloatA
(
HDC
hdc
,
UINT
first
,
UINT
last
,
LPABCFLOAT
abcf
)
{
FIXME_
(
gdi
)(
"GetCharABCWidthsFloatA, stub
\n
"
);
return
0
;
INT
i
,
wlen
,
count
=
(
INT
)(
last
-
first
+
1
);
LPSTR
str
;
LPWSTR
wstr
;
BOOL
ret
=
TRUE
;
if
(
count
<=
0
)
return
FALSE
;
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
);
for
(
i
=
0
;
i
<
count
;
i
++
)
str
[
i
]
=
(
BYTE
)(
first
+
i
);
wstr
=
FONT_mbtowc
(
hdc
,
str
,
count
,
&
wlen
,
NULL
);
for
(
i
=
0
;
i
<
wlen
;
i
++
)
{
if
(
!
GetCharABCWidthsFloatW
(
hdc
,
wstr
[
i
],
wstr
[
i
],
abcf
))
{
ret
=
FALSE
;
break
;
}
abcf
++
;
}
HeapFree
(
GetProcessHeap
(),
0
,
str
);
HeapFree
(
GetProcessHeap
(),
0
,
wstr
);
return
ret
;
}
/*************************************************************************
* GetCharABCWidthsFloatW [GDI32.@]
*
* Retrieves widths of a range of characters.
*
* PARAMS
* hdc [I] Handle to device context.
* first [I] First character in range to query.
* last [I] Last character in range to query.
* abcf [O] Array of LPABCFLOAT structures.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* BUGS
* Only works with TrueType fonts. It also doesn't return real
* floats but converted integers because it's implemented on
* top of GetCharABCWidthsW.
*/
BOOL
WINAPI
GetCharABCWidthsFloatW
(
HDC
hdc
,
UINT
iFirstChar
,
UINT
iLastChar
,
LPABCFLOAT
lpABCF
)
BOOL
WINAPI
GetCharABCWidthsFloatW
(
HDC
hdc
,
UINT
first
,
UINT
last
,
LPABCFLOAT
abcf
)
{
FIXME_
(
gdi
)(
"GetCharABCWidthsFloatW, stub
\n
"
);
return
0
;
ABC
*
abc
;
unsigned
int
i
,
size
=
sizeof
(
ABC
)
*
(
last
-
first
+
1
);
BOOL
ret
;
TRACE
(
"%p, %d, %d, %p - partial stub
\n
"
,
hdc
,
first
,
last
,
abcf
);
abc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
abc
)
return
FALSE
;
ret
=
GetCharABCWidthsW
(
hdc
,
first
,
last
,
abc
);
if
(
ret
==
TRUE
)
{
for
(
i
=
first
;
i
<=
last
;
i
++
,
abc
++
,
abcf
++
)
{
abcf
->
abcfA
=
abc
->
abcA
;
abcf
->
abcfB
=
abc
->
abcB
;
abcf
->
abcfC
=
abc
->
abcC
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
abc
);
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