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
fca83b09
Commit
fca83b09
authored
Feb 16, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Use itemizer hint to reset invisible run glyph count.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
297b3d08
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
layout.c
dlls/dwrite/layout.c
+3
-4
layout.c
dlls/dwrite/tests/layout.c
+5
-6
No files found.
dlls/dwrite/layout.c
View file @
fca83b09
...
...
@@ -965,10 +965,9 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout)
run
->
run
.
glyphAdvances
=
run
->
advances
;
run
->
run
.
glyphOffsets
=
run
->
offsets
;
/* Special treatment of control script, shaping code adds normal glyphs for it,
with non-zero advances, and layout code exposes those as zero width clusters,
so we have to do it manually. */
if
(
run
->
sa
.
script
==
Script_Common
)
/* Special treatment for runs that don't produce visual output, shaping code adds normal glyphs for them,
with valid cluster map and potentially with non-zero advances; layout code exposes those as zero width clusters. */
if
(
run
->
sa
.
shapes
==
DWRITE_SCRIPT_SHAPES_NO_VISUAL
)
run
->
run
.
glyphCount
=
0
;
else
run
->
run
.
glyphCount
=
run
->
glyphcount
;
...
...
dlls/dwrite/tests/layout.c
View file @
fca83b09
...
...
@@ -33,7 +33,6 @@ static const WCHAR tahomaW[] = {'T','a','h','o','m','a',0};
static
const
WCHAR
enusW
[]
=
{
'e'
,
'n'
,
'-'
,
'u'
,
's'
,
0
};
static
DWRITE_SCRIPT_ANALYSIS
g_sa
;
static
DWRITE_SCRIPT_ANALYSIS
g_control_sa
;
/* test IDWriteTextAnalysisSink */
static
HRESULT
WINAPI
analysissink_QueryInterface
(
IDWriteTextAnalysisSink
*
iface
,
REFIID
riid
,
void
**
obj
)
...
...
@@ -513,7 +512,9 @@ static HRESULT WINAPI testrenderer_DrawGlyphRun(IDWriteTextRenderer *iface,
/* see what's reported for control codes runs */
get_script_analysis
(
descr
->
string
,
descr
->
stringLength
,
&
sa
);
if
(
sa
.
script
==
g_control_sa
.
script
)
{
if
(
sa
.
shapes
==
DWRITE_SCRIPT_SHAPES_NO_VISUAL
)
{
UINT32
i
;
/* glyphs are not reported at all for control code runs */
ok
(
run
->
glyphCount
==
0
,
"got %u
\n
"
,
run
->
glyphCount
);
ok
(
run
->
glyphAdvances
!=
NULL
,
"advances array %p
\n
"
,
run
->
glyphAdvances
);
...
...
@@ -523,6 +524,8 @@ static HRESULT WINAPI testrenderer_DrawGlyphRun(IDWriteTextRenderer *iface,
ok
(
descr
->
string
!=
NULL
,
"got string %p
\n
"
,
descr
->
string
);
ok
(
descr
->
stringLength
>
0
,
"got string length %u
\n
"
,
descr
->
stringLength
);
ok
(
descr
->
clusterMap
!=
NULL
,
"clustermap %p
\n
"
,
descr
->
clusterMap
);
for
(
i
=
0
;
i
<
descr
->
stringLength
;
i
++
)
ok
(
descr
->
clusterMap
[
i
]
==
i
,
"got %u
\n
"
,
descr
->
clusterMap
[
i
]);
}
entry
.
kind
=
DRAW_GLYPHRUN
;
...
...
@@ -4852,7 +4855,6 @@ todo_wine
START_TEST
(
layout
)
{
static
const
WCHAR
ctrlstrW
[]
=
{
0x202a
,
0
};
IDWriteFactory
*
factory
;
if
(
!
(
factory
=
create_factory
()))
{
...
...
@@ -4860,9 +4862,6 @@ START_TEST(layout)
return
;
}
/* actual script ids are not fixed */
get_script_analysis
(
ctrlstrW
,
1
,
&
g_control_sa
);
init_call_sequences
(
sequences
,
NUM_CALL_SEQUENCES
);
init_call_sequences
(
expected_seq
,
1
);
...
...
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