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
0c1f3290
Commit
0c1f3290
authored
May 19, 2015
by
Huw Davies
Committed by
Alexandre Julliard
May 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Prevent the underline / strikeout width getting rounded to zero.
parent
0940ce32
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
font.c
dlls/gdi32/font.c
+14
-3
No files found.
dlls/gdi32/font.c
View file @
0c1f3290
...
@@ -2109,6 +2109,18 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
...
@@ -2109,6 +2109,18 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
return
ret
;
return
ret
;
}
}
/***********************************************************************
* get_line_width
*
* Scale the underline / strikeout line width.
*/
static
inline
int
get_line_width
(
DC
*
dc
,
int
metric_size
)
{
int
width
=
abs
(
INTERNAL_YWSTODS
(
dc
,
metric_size
));
if
(
width
==
0
)
width
=
1
;
if
(
metric_size
<
0
)
width
=
-
width
;
return
width
;
}
/***********************************************************************
/***********************************************************************
* ExtTextOutW (GDI32.@)
* ExtTextOutW (GDI32.@)
...
@@ -2473,11 +2485,10 @@ done:
...
@@ -2473,11 +2485,10 @@ done:
GetOutlineTextMetricsW
(
hdc
,
size
,
otm
);
GetOutlineTextMetricsW
(
hdc
,
size
,
otm
);
underlinePos
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsUnderscorePosition
));
underlinePos
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsUnderscorePosition
));
if
(
otm
->
otmsUnderscorePosition
<
0
)
underlinePos
=
-
underlinePos
;
if
(
otm
->
otmsUnderscorePosition
<
0
)
underlinePos
=
-
underlinePos
;
underlineWidth
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsUnderscoreSize
));
underlineWidth
=
get_line_width
(
dc
,
otm
->
otmsUnderscoreSize
);
if
(
otm
->
otmsUnderscoreSize
<
0
)
underlineWidth
=
-
underlineWidth
;
strikeoutPos
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsStrikeoutPosition
));
strikeoutPos
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsStrikeoutPosition
));
if
(
otm
->
otmsStrikeoutPosition
<
0
)
strikeoutPos
=
-
strikeoutPos
;
if
(
otm
->
otmsStrikeoutPosition
<
0
)
strikeoutPos
=
-
strikeoutPos
;
strikeoutWidth
=
abs
(
INTERNAL_YWSTODS
(
dc
,
otm
->
otmsStrikeoutSize
)
);
strikeoutWidth
=
get_line_width
(
dc
,
otm
->
otmsStrikeoutSize
);
HeapFree
(
GetProcessHeap
(),
0
,
otm
);
HeapFree
(
GetProcessHeap
(),
0
,
otm
);
}
}
...
...
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