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
199409a2
Commit
199409a2
authored
Nov 07, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix positioning of font underlines and strikeouts.
parent
7f17934d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
font.c
dlls/gdi32/font.c
+15
-12
No files found.
dlls/gdi32/font.c
View file @
199409a2
...
...
@@ -2095,20 +2095,23 @@ done:
{
otm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
GetOutlineTextMetricsW
(
hdc
,
size
,
otm
);
underlinePos
=
otm
->
otmsUnderscorePosition
;
underlineWidth
=
otm
->
otmsUnderscoreSize
;
strikeoutPos
=
otm
->
otmsStrikeoutPosition
;
strikeoutWidth
=
otm
->
otmsStrikeoutSize
;
underlinePos
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsUnderscorePosition
));
if
(
otm
->
otmsUnderscorePosition
<
0
)
underlinePos
=
-
underlinePos
;
underlineWidth
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsUnderscoreSize
));
if
(
otm
->
otmsUnderscoreSize
<
0
)
underlineWidth
=
-
underlineWidth
;
strikeoutPos
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsStrikeoutPosition
));
if
(
otm
->
otmsStrikeoutPosition
<
0
)
strikeoutPos
=
-
strikeoutPos
;
strikeoutWidth
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsStrikeoutSize
));
HeapFree
(
GetProcessHeap
(),
0
,
otm
);
}
if
(
lf
.
lfUnderline
)
{
pts
[
0
].
x
=
x
-
underlinePos
*
sinEsc
;
pts
[
0
].
y
=
y
-
underlinePos
*
cosEsc
;
pts
[
1
].
x
=
x
+
width
.
x
-
underlinePos
*
sinEsc
;
pts
[
1
].
y
=
y
+
width
.
y
-
underlinePos
*
cosEsc
;
pts
[
0
].
x
=
x
-
(
underlinePos
+
underlineWidth
/
2
)
*
sinEsc
;
pts
[
0
].
y
=
y
-
(
underlinePos
+
underlineWidth
/
2
)
*
cosEsc
;
pts
[
1
].
x
=
x
+
width
.
x
-
(
underlinePos
+
underlineWidth
/
2
)
*
sinEsc
;
pts
[
1
].
y
=
y
+
width
.
y
-
(
underlinePos
+
underlineWidth
/
2
)
*
cosEsc
;
pts
[
2
].
x
=
pts
[
1
].
x
+
underlineWidth
*
sinEsc
;
pts
[
2
].
y
=
pts
[
1
].
y
+
underlineWidth
*
cosEsc
;
pts
[
3
].
x
=
pts
[
0
].
x
+
underlineWidth
*
sinEsc
;
...
...
@@ -2121,10 +2124,10 @@ done:
if
(
lf
.
lfStrikeOut
)
{
pts
[
0
].
x
=
x
-
strikeoutPos
*
sinEsc
;
pts
[
0
].
y
=
y
-
strikeoutPos
*
cosEsc
;
pts
[
1
].
x
=
x
+
width
.
x
-
strikeoutPos
*
sinEsc
;
pts
[
1
].
y
=
y
+
width
.
y
-
strikeoutPos
*
cosEsc
;
pts
[
0
].
x
=
x
-
(
strikeoutPos
+
strikeoutWidth
/
2
)
*
sinEsc
;
pts
[
0
].
y
=
y
-
(
strikeoutPos
+
strikeoutWidth
/
2
)
*
cosEsc
;
pts
[
1
].
x
=
x
+
width
.
x
-
(
strikeoutPos
+
strikeoutWidth
/
2
)
*
sinEsc
;
pts
[
1
].
y
=
y
+
width
.
y
-
(
strikeoutPos
+
strikeoutWidth
/
2
)
*
cosEsc
;
pts
[
2
].
x
=
pts
[
1
].
x
+
strikeoutWidth
*
sinEsc
;
pts
[
2
].
y
=
pts
[
1
].
y
+
strikeoutWidth
*
cosEsc
;
pts
[
3
].
x
=
pts
[
0
].
x
+
strikeoutWidth
*
sinEsc
;
...
...
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