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
76c31950
Commit
76c31950
authored
Jan 31, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Added support for DWRITE_WORD_WRAPPING_CHARACTER mode.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bdc309b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
layout.c
dlls/dwrite/layout.c
+11
-3
No files found.
dlls/dwrite/layout.c
View file @
76c31950
...
...
@@ -1868,6 +1868,14 @@ static void layout_add_line(struct dwrite_textlayout *layout, UINT32 first_clust
*
textpos
+=
metrics
.
length
;
}
static
BOOL
layout_can_wrap_after
(
const
struct
dwrite_textlayout
*
layout
,
UINT32
cluster
)
{
if
(
layout
->
format
.
wrapping
==
DWRITE_WORD_WRAPPING_CHARACTER
)
return
TRUE
;
return
layout
->
clustermetrics
[
cluster
].
canWrapLineAfter
;
}
static
HRESULT
layout_compute_effective_runs
(
struct
dwrite_textlayout
*
layout
)
{
BOOL
is_rtl
=
layout
->
format
.
readingdir
==
DWRITE_READING_DIRECTION_RIGHT_TO_LEFT
;
...
...
@@ -1907,7 +1915,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
if
(
overflow
)
break
;
if
(
layout
->
clustermetrics
[
i
].
canWrapLineAfter
)
if
(
layout
_can_wrap_after
(
layout
,
i
)
)
last_breaking_point
=
i
;
width
+=
layout
->
clustermetrics
[
i
].
width
;
i
++
;
...
...
@@ -1916,7 +1924,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
if
(
overflow
)
{
/* Overflown on whitespace, ignore it */
if
(
layout
->
clustermetrics
[
i
].
isWhitespace
&&
layout
->
clustermetrics
[
i
].
canWrapLineAfter
)
if
(
layout
->
clustermetrics
[
i
].
isWhitespace
&&
layout
_can_wrap_after
(
layout
,
i
)
)
i
=
i
;
/* Use most recently found breaking point */
else
if
(
last_breaking_point
!=
~
0u
)
{
...
...
@@ -1926,7 +1934,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
else
{
/* Otherwise proceed forward to next newline or breaking point */
for
(;
i
<
layout
->
cluster_count
;
i
++
)
if
(
layout
->
clustermetrics
[
i
].
canWrapLineAfter
||
layout
->
clustermetrics
[
i
].
isNewline
)
if
(
layout
_can_wrap_after
(
layout
,
i
)
||
layout
->
clustermetrics
[
i
].
isNewline
)
break
;
}
}
...
...
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