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
3d7fabf6
Commit
3d7fabf6
authored
Mar 30, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix off by one error in glyph count adjustment.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7371325c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
layout.c
dlls/dwrite/layout.c
+2
-3
layout.c
dlls/dwrite/tests/layout.c
+2
-2
No files found.
dlls/dwrite/layout.c
View file @
3d7fabf6
...
...
@@ -1269,10 +1269,9 @@ static HRESULT layout_add_effective_run(struct dwrite_textlayout *layout, const
run
->
line
=
line
;
if
(
r
->
u
.
regular
.
run
.
glyphCount
)
{
/*
trim from the left
*/
/*
Trim leading and trailing clusters.
*/
run
->
glyphcount
=
r
->
u
.
regular
.
run
.
glyphCount
-
r
->
u
.
regular
.
clustermap
[
start
];
/* trim from the right */
if
(
start
+
length
<
r
->
u
.
regular
.
descr
.
stringLength
-
1
)
if
(
start
+
length
<
r
->
u
.
regular
.
descr
.
stringLength
)
run
->
glyphcount
-=
r
->
u
.
regular
.
run
.
glyphCount
-
r
->
u
.
regular
.
clustermap
[
start
+
length
];
}
else
...
...
dlls/dwrite/tests/layout.c
View file @
3d7fabf6
...
...
@@ -1626,7 +1626,7 @@ static void test_Draw(void)
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteTextLayout_Draw
(
layout
,
&
ctxt
,
&
testrenderer
,
0
.
0
,
0
.
0
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
draw_seq
,
"draw test"
,
TRU
E
);
ok_sequence
(
sequences
,
RENDERER_ID
,
draw_seq
,
"draw test"
,
FALS
E
);
IDWriteTextLayout_Release
(
layout
);
/* with reduced width DrawGlyphRun() is called for every line */
...
...
@@ -4987,7 +4987,7 @@ todo_wine
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteTextLayout_Draw
(
layout
,
NULL
,
&
testrenderer
,
0
.
0
f
,
0
.
0
f
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
drawunderline4_seq
,
"draw underline test 4"
,
TRU
E
);
ok_sequence
(
sequences
,
RENDERER_ID
,
drawunderline4_seq
,
"draw underline test 4"
,
FALS
E
);
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