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
2aaa6d1a
Commit
2aaa6d1a
authored
May 21, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Remove feature duplicates before applying them.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0e308156
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
shape.c
dlls/dwrite/shape.c
+25
-0
No files found.
dlls/dwrite/shape.c
View file @
2aaa6d1a
...
...
@@ -210,6 +210,27 @@ static void shape_add_feature(struct shaping_features *features, unsigned int ta
features
->
features
[
features
->
count
++
].
tag
=
tag
;
}
static
int
features_sorting_compare
(
const
void
*
a
,
const
void
*
b
)
{
const
struct
shaping_feature
*
left
=
a
,
*
right
=
b
;
return
left
->
tag
!=
right
->
tag
?
(
left
->
tag
<
right
->
tag
?
-
1
:
1
)
:
0
;
};
static
void
shape_merge_features
(
struct
shaping_features
*
features
)
{
unsigned
int
j
=
0
,
i
;
/* Sort and merge duplicates. */
qsort
(
features
->
features
,
features
->
count
,
sizeof
(
*
features
->
features
),
features_sorting_compare
);
for
(
i
=
1
;
i
<
features
->
count
;
++
i
)
{
if
(
features
->
features
[
i
].
tag
!=
features
->
features
[
j
].
tag
)
features
->
features
[
++
j
]
=
features
->
features
[
i
];
}
features
->
count
=
j
+
1
;
}
HRESULT
shape_get_positions
(
struct
scriptshaping_context
*
context
,
const
unsigned
int
*
scripts
)
{
static
const
unsigned
int
common_features
[]
=
...
...
@@ -239,6 +260,8 @@ HRESULT shape_get_positions(struct scriptshaping_context *context, const unsigne
shape_add_feature
(
&
features
,
horizontal_features
[
i
]);
}
shape_merge_features
(
&
features
);
/* Resolve script tag to actually supported script. */
if
(
cache
->
gpos
.
table
.
data
)
{
...
...
@@ -322,6 +345,8 @@ HRESULT shape_get_glyphs(struct scriptshaping_context *context, const unsigned i
shape_add_feature
(
&
features
,
horizontal_features
[
i
]);
}
shape_merge_features
(
&
features
);
/* Resolve script tag to actually supported script. */
if
(
cache
->
gsub
.
table
.
data
)
{
...
...
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