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
06a49f67
Commit
06a49f67
authored
Aug 24, 2001
by
Bill Medland
Committed by
Alexandre Julliard
Aug 24, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes involving handling NULL pointers.
parent
0801ffc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
font.c
objects/font.c
+40
-3
No files found.
objects/font.c
View file @
06a49f67
...
...
@@ -1124,6 +1124,33 @@ BOOL WINAPI GetTextExtentExPointA( HDC hdc, LPCSTR str, INT count,
/***********************************************************************
* GetTextExtentExPointW (GDI32.@)
*
* Return the size of the string as it would be if it was output properly by
* e.g. TextOut.
*
* This should include
* - Intercharacter spacing
* - justification spacing (not yet done)
* - kerning? see below
*
* Kerning. Since kerning would be carried out by the rendering code it should
* be done by the driver. However they don't support it yet. Also I am not
* yet persuaded that (certainly under Win95) any kerning is actually done.
*
* str: According to MSDN this should be null-terminated. That is not true; a
* null will not terminate it early.
* size: Certainly under Win95 this appears buggy or weird if *lpnFit is less
* than count. I have seen it be either the size of the full string or
* 1 less than the size of the full string. I have not seen it bear any
* resemblance to the portion that would fit.
* lpnFit: What exactly is fitting? Stupidly, in my opinion, it includes the
* trailing intercharacter spacing and any trailing justification.
*
* FIXME
* Currently we do this by measuring each character etc. We should do it by
* passing the request to the driver, perhaps by extending the
* pGetTextExtentPoint function to take the alpDx argument. That would avoid
* thinking about kerning issues and rounding issues in the justification.
*/
BOOL
WINAPI
GetTextExtentExPointW
(
HDC
hdc
,
LPCWSTR
str
,
INT
count
,
...
...
@@ -1142,7 +1169,12 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count,
for
(
index
=
0
;
index
<
count
;
index
++
)
{
if
(
!
dc
->
funcs
->
pGetTextExtentPoint
(
dc
,
str
,
1
,
&
tSize
))
goto
done
;
if
(
extent
+
tSize
.
cx
<
maxExt
)
/* GetTextExtentPoint includes intercharacter spacing. */
/* FIXME - justification needs doing yet. Remember that the base
* data will not be in logical coordinates.
*/
if
(
!
lpnFit
||
extent
+
tSize
.
cx
<=
maxExt
)
/* It is allowed to be equal. */
{
extent
+=
tSize
.
cx
;
nFit
++
;
...
...
@@ -1640,6 +1672,7 @@ BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
/*************************************************************************
* GetKerningPairs (GDI.332)
*
*/
INT16
WINAPI
GetKerningPairs16
(
HDC16
hDC
,
INT16
cPairs
,
LPKERNINGPAIR16
lpKerningPairs
)
...
...
@@ -1647,8 +1680,12 @@ INT16 WINAPI GetKerningPairs16( HDC16 hDC, INT16 cPairs,
/* At this time kerning is ignored (set to 0) */
int
i
;
FIXME
(
"(%x,%d,%p): almost empty stub!
\n
"
,
hDC
,
cPairs
,
lpKerningPairs
);
for
(
i
=
0
;
i
<
cPairs
;
i
++
)
lpKerningPairs
[
i
].
iKernAmount
=
0
;
if
(
lpKerningPairs
)
for
(
i
=
0
;
i
<
cPairs
;
i
++
)
lpKerningPairs
[
i
].
iKernAmount
=
0
;
/* FIXME: Should this function call SetLastError (0)? This is yet another
* Microsoft function that can return 0 on success or failure
*/
return
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