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
b4592cbc
Commit
b4592cbc
authored
Jun 18, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Count last cluster length too when building a line.
parent
e8c4951a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
layout.c
dlls/dwrite/layout.c
+12
-6
layout.c
dlls/dwrite/tests/layout.c
+0
-1
No files found.
dlls/dwrite/layout.c
View file @
b4592cbc
...
...
@@ -1026,7 +1026,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
s
[
0
]
=
s
[
1
]
=
layout_get_strikethrough_from_pos
(
layout
,
0
);
for
(
i
=
0
,
start
=
0
,
textpos
=
0
,
width
=
0
.
0
;
i
<
layout
->
cluster_count
;
i
++
)
{
BOOL
can_wrap_after
=
layout
->
clustermetrics
[
i
].
canWrapLineAfter
;
BOOL
overflow
;
s
[
1
]
=
layout_get_strikethrough_from_pos
(
layout
,
textpos
);
...
...
@@ -1041,12 +1041,18 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
start
=
i
;
}
/* check if we got new line */
if
(((
can_wrap_after
&&
(
width
+
layout
->
clustermetrics
[
i
].
width
>
layout
->
maxwidth
))
||
layout
->
clustermetrics
[
i
].
isNewline
||
/* always wrap on new line */
i
==
layout
->
cluster_count
-
1
))
/* end of the text */
{
overflow
=
layout
->
clustermetrics
[
i
].
canWrapLineAfter
&&
(
width
+
layout
->
clustermetrics
[
i
].
width
>
layout
->
maxwidth
);
/* check if we got new */
if
(
overflow
||
layout
->
clustermetrics
[
i
].
isNewline
||
/* always wrap on new line */
i
==
layout
->
cluster_count
-
1
)
/* end of the text */
{
UINT32
strlength
=
metrics
.
length
,
index
=
i
;
UINT32
strlength
,
index
=
i
;
if
(
!
overflow
)
metrics
.
length
+=
layout
->
clustermetrics
[
i
].
length
;
strlength
=
metrics
.
length
;
if
(
i
>=
start
)
{
hr
=
layout_add_effective_run
(
layout
,
run
,
start
,
i
-
start
+
1
,
origin_x
,
s
[
0
]);
...
...
dlls/dwrite/tests/layout.c
View file @
b4592cbc
...
...
@@ -2745,7 +2745,6 @@ static void test_GetLineMetrics(void)
memset
(
&
metrics
,
0
,
sizeof
(
metrics
));
hr
=
IDWriteTextLayout_GetLineMetrics
(
layout
,
&
metrics
,
1
,
&
count
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
metrics
.
length
==
5
,
"got %u
\n
"
,
metrics
.
length
);
ok
(
metrics
.
trailingWhitespaceLength
==
1
,
"got %u
\n
"
,
metrics
.
trailingWhitespaceLength
);
...
...
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