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
2975ae9c
Commit
2975ae9c
authored
Jan 26, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix setting canWrapLineAfter cluster flag.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d1711850
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
layout.c
dlls/dwrite/layout.c
+3
-3
layout.c
dlls/dwrite/tests/layout.c
+5
-0
No files found.
dlls/dwrite/layout.c
View file @
2975ae9c
...
...
@@ -603,10 +603,10 @@ static inline void init_cluster_metrics(const struct dwrite_textlayout *layout,
position
=
run
->
descr
.
textPosition
+
stop_position
;
if
(
stop_glyph
==
run
->
glyphcount
)
breakcondition
=
get_effective_breakpoint
(
layout
,
stop_
position
).
breakConditionAfter
;
breakcondition
=
get_effective_breakpoint
(
layout
,
position
).
breakConditionAfter
;
else
{
breakcondition
=
get_effective_breakpoint
(
layout
,
stop_
position
).
breakConditionBefore
;
if
(
stop_position
)
position
=
stop_position
-
1
;
breakcondition
=
get_effective_breakpoint
(
layout
,
position
).
breakConditionBefore
;
if
(
stop_position
)
position
-=
1
;
}
metrics
->
canWrapLineAfter
=
breakcondition
==
DWRITE_BREAK_CONDITION_CAN_BREAK
||
...
...
dlls/dwrite/tests/layout.c
View file @
2975ae9c
...
...
@@ -1907,6 +1907,7 @@ todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
count
==
2
,
"got %u
\n
"
,
count
);
ok
(
metrics
[
0
].
isWhitespace
==
0
,
"got %d
\n
"
,
metrics
[
0
].
isWhitespace
);
ok
(
metrics
[
0
].
canWrapLineAfter
==
0
,
"got %d
\n
"
,
metrics
[
0
].
canWrapLineAfter
);
ok
(
metrics
[
1
].
isWhitespace
==
1
,
"got %d
\n
"
,
metrics
[
1
].
isWhitespace
);
ok
(
metrics
[
1
].
canWrapLineAfter
==
1
,
"got %d
\n
"
,
metrics
[
1
].
canWrapLineAfter
);
IDWriteTextLayout_Release
(
layout
);
...
...
@@ -1990,6 +1991,10 @@ todo_wine {
for
(
i
=
0
;
i
<
count
;
i
++
)
{
ok
(
metrics
[
i
].
length
==
1
,
"%d: got %d
\n
"
,
i
,
metrics
[
i
].
length
);
ok
(
metrics
[
i
].
isSoftHyphen
==
(
i
==
count
-
1
),
"%d: got %d
\n
"
,
i
,
metrics
[
i
].
isSoftHyphen
);
if
(
metrics
[
i
].
isNewline
)
{
ok
(
metrics
[
i
].
width
==
0
.
0
f
,
"%u: got width %f
\n
"
,
i
,
metrics
[
i
].
width
);
ok
(
metrics
[
i
].
canWrapLineAfter
==
1
,
"%u: got %d
\n
"
,
i
,
metrics
[
i
].
canWrapLineAfter
);
}
}
IDWriteTextLayout_Release
(
layout
);
...
...
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