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
894737ac
Commit
894737ac
authored
Dec 23, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Split each text range into runs by script.
parent
61fc9ac9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
296 additions
and
2 deletions
+296
-2
layout.c
dlls/dwrite/layout.c
+252
-2
layout.c
dlls/dwrite/tests/layout.c
+44
-0
No files found.
dlls/dwrite/layout.c
View file @
894737ac
This diff is collapsed.
Click to expand it.
dlls/dwrite/tests/layout.c
View file @
894737ac
...
...
@@ -881,6 +881,49 @@ static void test_typography(void)
IDWriteTypography_Release
(
typography
);
}
static
void
test_GetClusterMetrics
(
void
)
{
static
const
WCHAR
strW
[]
=
{
'a'
,
'b'
,
'c'
,
'd'
,
0
};
IDWriteInlineObject
*
trimm
;
IDWriteTextFormat
*
format
;
IDWriteTextLayout
*
layout
;
DWRITE_TEXT_RANGE
range
;
UINT32
count
;
HRESULT
hr
;
hr
=
IDWriteFactory_CreateTextFormat
(
factory
,
tahomaW
,
NULL
,
DWRITE_FONT_WEIGHT_NORMAL
,
DWRITE_FONT_STYLE_NORMAL
,
DWRITE_FONT_STRETCH_NORMAL
,
10
.
0
,
enusW
,
&
format
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
strW
,
4
,
format
,
1000
.
0
,
1000
.
0
,
&
layout
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
count
=
0
;
hr
=
IDWriteTextLayout_GetClusterMetrics
(
layout
,
NULL
,
0
,
&
count
);
todo_wine
{
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got 0x%08x
\n
"
,
hr
);
ok
(
count
==
4
,
"got %u
\n
"
,
count
);
}
hr
=
IDWriteFactory_CreateEllipsisTrimmingSign
(
factory
,
format
,
&
trimm
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
range
.
startPosition
=
0
;
range
.
length
=
2
;
hr
=
IDWriteTextLayout_SetInlineObject
(
layout
,
trimm
,
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
/* inline object takes a separate cluster, replaced codepoints number doesn't matter */
count
=
0
;
hr
=
IDWriteTextLayout_GetClusterMetrics
(
layout
,
NULL
,
0
,
&
count
);
todo_wine
{
ok
(
hr
==
E_NOT_SUFFICIENT_BUFFER
,
"got 0x%08x
\n
"
,
hr
);
ok
(
count
==
3
,
"got %u
\n
"
,
count
);
}
IDWriteInlineObject_Release
(
trimm
);
IDWriteTextLayout_Release
(
layout
);
IDWriteTextFormat_Release
(
format
);
}
START_TEST
(
layout
)
{
HRESULT
hr
;
...
...
@@ -905,6 +948,7 @@ START_TEST(layout)
test_SetInlineObject
();
test_draw_sequence
();
test_typography
();
test_GetClusterMetrics
();
IDWriteFactory_Release
(
factory
);
}
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