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
d37eb0f1
Commit
d37eb0f1
authored
Jul 18, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement MapCharacters() for custom fallback.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
d800cd74
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
255 additions
and
30 deletions
+255
-30
analyzer.c
dlls/dwrite/analyzer.c
+242
-10
layout.c
dlls/dwrite/tests/layout.c
+13
-20
No files found.
dlls/dwrite/analyzer.c
View file @
d37eb0f1
This diff is collapsed.
Click to expand it.
dlls/dwrite/tests/layout.c
View file @
d37eb0f1
...
...
@@ -4937,12 +4937,11 @@ static void test_FontFallbackBuilder(void)
font
=
(
void
*
)
0xdeadbeef
;
hr
=
IDWriteFontFallback_MapCharacters
(
fallback
,
&
analysissource
,
0
,
1
,
NULL
,
NULL
,
DWRITE_FONT_WEIGHT_NORMAL
,
DWRITE_FONT_STYLE_NORMAL
,
DWRITE_FONT_STRETCH_NORMAL
,
&
mappedlength
,
&
font
,
&
scale
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
mappedlength
==
1
,
"
got %u
\n
"
,
mappedlength
);
ok
(
scale
==
1
.
0
f
,
"
got %f
\n
"
,
scale
);
ok
(
font
==
NULL
,
"got %p
\n
"
,
font
);
}
ok
(
mappedlength
==
1
,
"
Unexpected length %u.
\n
"
,
mappedlength
);
ok
(
scale
==
1
.
0
f
,
"
Unexpected scale %f.
\n
"
,
scale
);
ok
(
!
font
,
"Unexpected font instance %p.
\n
"
,
font
);
IDWriteFontFallback_Release
(
fallback
);
/* remap with custom collection */
...
...
@@ -4959,12 +4958,10 @@ todo_wine {
font
=
NULL
;
hr
=
IDWriteFontFallback_MapCharacters
(
fallback
,
&
analysissource
,
0
,
1
,
NULL
,
NULL
,
DWRITE_FONT_WEIGHT_NORMAL
,
DWRITE_FONT_STYLE_NORMAL
,
DWRITE_FONT_STRETCH_NORMAL
,
&
mappedlength
,
&
font
,
&
scale
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
mappedlength
==
1
,
"got %u
\n
"
,
mappedlength
);
ok
(
scale
==
5
.
0
f
,
"got %f
\n
"
,
scale
);
ok
(
font
!=
NULL
,
"got %p
\n
"
,
font
);
}
ok
(
mappedlength
==
1
,
"Unexpected length %u.
\n
"
,
mappedlength
);
ok
(
scale
==
5
.
0
f
,
"Unexpected scale %f.
\n
"
,
scale
);
ok
(
font
!=
NULL
,
"Expected font instance %p.
\n
"
,
font
);
if
(
font
)
IDWriteFont_Release
(
font
);
...
...
@@ -4984,12 +4981,10 @@ todo_wine {
font
=
NULL
;
hr
=
IDWriteFontFallback_MapCharacters
(
fallback
,
&
analysissource
,
0
,
1
,
NULL
,
NULL
,
DWRITE_FONT_WEIGHT_NORMAL
,
DWRITE_FONT_STYLE_NORMAL
,
DWRITE_FONT_STRETCH_NORMAL
,
&
mappedlength
,
&
font
,
&
scale
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
mappedlength
==
1
,
"got %u
\n
"
,
mappedlength
);
ok
(
scale
==
5
.
0
f
,
"got %f
\n
"
,
scale
);
ok
(
font
!=
NULL
,
"got %p
\n
"
,
font
);
}
ok
(
mappedlength
==
1
,
"Unexpected length %u.
\n
"
,
mappedlength
);
ok
(
scale
==
5
.
0
f
,
"Unexpected scale %f.
\n
"
,
scale
);
ok
(
font
!=
NULL
,
"Expected font instance %p.
\n
"
,
font
);
if
(
font
)
IDWriteFont_Release
(
font
);
...
...
@@ -5010,12 +5005,10 @@ todo_wine {
font
=
NULL
;
hr
=
IDWriteFontFallback_MapCharacters
(
fallback
,
&
analysissource
,
0
,
1
,
NULL
,
NULL
,
DWRITE_FONT_WEIGHT_NORMAL
,
DWRITE_FONT_STYLE_NORMAL
,
DWRITE_FONT_STRETCH_NORMAL
,
&
mappedlength
,
&
font
,
&
scale
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
mappedlength
==
1
,
"got %u
\n
"
,
mappedlength
);
ok
(
scale
==
5
.
0
f
,
"got %f
\n
"
,
scale
);
ok
(
font
!=
NULL
,
"got %p
\n
"
,
font
);
}
ok
(
mappedlength
==
1
,
"Unexpected length %u.
\n
"
,
mappedlength
);
ok
(
scale
==
5
.
0
f
,
"Unexpected scale %f.
\n
"
,
scale
);
ok
(
font
!=
NULL
,
"Expected font instance %p.
\n
"
,
font
);
if
(
font
)
IDWriteFont_Release
(
font
);
...
...
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