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
96757205
Commit
96757205
authored
Jun 24, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Initialize otmMacAscent, otmMacDescent, otmMacLineGap in outline text metrics.
parent
e3787959
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
freetype.c
dlls/gdi32/freetype.c
+4
-4
font.c
dlls/gdi32/tests/font.c
+3
-2
No files found.
dlls/gdi32/freetype.c
View file @
96757205
...
...
@@ -5103,7 +5103,6 @@ UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
}
TM
.
tmCharSet
=
font
->
charset
;
#undef TM
font
->
potm
->
otmFiller
=
0
;
memcpy
(
&
font
->
potm
->
otmPanoseNumber
,
pOS2
->
panose
,
PANOSE_COUNT
);
...
...
@@ -5122,9 +5121,9 @@ UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
font
->
potm
->
otmrcFontBox
.
right
=
(
pFT_MulFix
(
ft_face
->
bbox
.
xMax
,
x_scale
)
+
32
)
>>
6
;
font
->
potm
->
otmrcFontBox
.
top
=
(
pFT_MulFix
(
ft_face
->
bbox
.
yMax
,
y_scale
)
+
32
)
>>
6
;
font
->
potm
->
otmrcFontBox
.
bottom
=
(
pFT_MulFix
(
ft_face
->
bbox
.
yMin
,
y_scale
)
+
32
)
>>
6
;
font
->
potm
->
otmMacAscent
=
0
;
/* where do these come from ? */
font
->
potm
->
otmMacDescent
=
0
;
font
->
potm
->
otmMacLineGap
=
0
;
font
->
potm
->
otmMacAscent
=
TM
.
tmAscent
;
font
->
potm
->
otmMacDescent
=
-
TM
.
tmDescent
;
font
->
potm
->
otmMacLineGap
=
font
->
potm
->
otmLineGap
;
font
->
potm
->
otmusMinimumPPEM
=
0
;
/* TT Header */
font
->
potm
->
otmptSubscriptSize
.
x
=
(
pFT_MulFix
(
pOS2
->
ySubscriptXSize
,
x_scale
)
+
32
)
>>
6
;
font
->
potm
->
otmptSubscriptSize
.
y
=
(
pFT_MulFix
(
pOS2
->
ySubscriptYSize
,
y_scale
)
+
32
)
>>
6
;
...
...
@@ -5143,6 +5142,7 @@ UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
font
->
potm
->
otmsUnderscoreSize
=
(
pFT_MulFix
(
pPost
->
underlineThickness
,
y_scale
)
+
32
)
>>
6
;
font
->
potm
->
otmsUnderscorePosition
=
(
pFT_MulFix
(
pPost
->
underlinePosition
,
y_scale
)
+
32
)
>>
6
;
}
#undef TM
/* otmp* members should clearly have type ptrdiff_t, but M$ knows best */
cp
=
(
char
*
)
font
->
potm
+
sizeof
(
*
font
->
potm
);
...
...
dlls/gdi32/tests/font.c
View file @
96757205
...
...
@@ -30,6 +30,7 @@
#include "wine/test.h"
#define near_match(a, b) (abs((a) - (b)) <= 4)
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
LONG
(
WINAPI
*
pGdiGetCharDimensions
)(
HDC
hdc
,
LPTEXTMETRICW
lptm
,
LONG
*
height
);
...
...
@@ -781,6 +782,8 @@ static void test_GetKerningPairs(void)
kd
[
i
].
otmDescent
,
otm
.
otmDescent
);
ok
(
kd
[
i
].
otmLineGap
==
otm
.
otmLineGap
,
"expected %u, got %u
\n
"
,
kd
[
i
].
otmLineGap
,
otm
.
otmLineGap
);
ok
(
near_match
(
kd
[
i
].
otmMacDescent
,
otm
.
otmMacDescent
),
"expected %d, got %d
\n
"
,
kd
[
i
].
otmMacDescent
,
otm
.
otmMacDescent
);
todo_wine
{
ok
(
kd
[
i
].
otmsCapEmHeight
==
otm
.
otmsCapEmHeight
,
"expected %u, got %u
\n
"
,
kd
[
i
].
otmsCapEmHeight
,
otm
.
otmsCapEmHeight
);
...
...
@@ -788,8 +791,6 @@ todo_wine {
kd
[
i
].
otmsXHeight
,
otm
.
otmsXHeight
);
ok
(
kd
[
i
].
otmMacAscent
==
otm
.
otmMacAscent
,
"expected %d, got %d
\n
"
,
kd
[
i
].
otmMacAscent
,
otm
.
otmMacAscent
);
ok
(
kd
[
i
].
otmMacDescent
==
otm
.
otmMacDescent
,
"expected %d, got %d
\n
"
,
kd
[
i
].
otmMacDescent
,
otm
.
otmMacDescent
);
/* FIXME: this one sometimes succeeds due to expected 0, enable it when removing todo */
if
(
0
)
ok
(
kd
[
i
].
otmMacLineGap
==
otm
.
otmMacLineGap
,
"expected %u, got %u
\n
"
,
kd
[
i
].
otmMacLineGap
,
otm
.
otmMacLineGap
);
...
...
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