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
db3eb6fc
Commit
db3eb6fc
authored
May 25, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Simplify single substitution helper.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f427f25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
opentype.c
dlls/dwrite/opentype.c
+6
-7
No files found.
dlls/dwrite/opentype.c
View file @
db3eb6fc
...
...
@@ -4420,6 +4420,7 @@ void opentype_layout_apply_gpos_features(struct scriptshaping_context *context,
static
BOOL
opentype_layout_apply_gsub_single_substitution
(
struct
glyph_iterator
*
iter
,
const
struct
ot_lookup
*
lookup
)
{
struct
scriptshaping_cache
*
cache
=
iter
->
context
->
cache
;
const
struct
dwrite_fonttable
*
gsub
=
&
cache
->
gsub
.
table
;
UINT16
format
,
coverage
;
unsigned
int
i
;
...
...
@@ -4436,10 +4437,9 @@ static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator
if
(
format
==
1
)
{
const
struct
ot_gsub_singlesubst_format1
*
format1
=
table_read_ensure
(
&
cache
->
gsub
.
table
,
subtable_offset
,
sizeof
(
*
format1
));
const
struct
ot_gsub_singlesubst_format1
*
format1
=
table_read_ensure
(
gsub
,
subtable_offset
,
sizeof
(
*
format1
));
coverage_index
=
opentype_layout_is_glyph_covered
(
&
cache
->
gsub
.
table
,
subtable_offset
+
coverage
,
glyph
);
coverage_index
=
opentype_layout_is_glyph_covered
(
gsub
,
subtable_offset
+
coverage
,
glyph
);
if
(
coverage_index
==
GLYPH_NOT_COVERED
)
continue
;
...
...
@@ -4448,12 +4448,11 @@ static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator
}
else
if
(
format
==
2
)
{
UINT16
count
=
table_read_be_word
(
&
cache
->
gsub
.
table
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_singlesubst_format2
,
count
));
const
struct
ot_gsub_singlesubst_format2
*
format2
=
table_read_ensure
(
&
cache
->
gsub
.
table
,
subtable_offset
,
UINT16
count
=
table_read_be_word
(
gsub
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_singlesubst_format2
,
count
));
const
struct
ot_gsub_singlesubst_format2
*
format2
=
table_read_ensure
(
gsub
,
subtable_offset
,
FIELD_OFFSET
(
struct
ot_gsub_singlesubst_format2
,
count
)
+
count
*
sizeof
(
UINT16
));
coverage_index
=
opentype_layout_is_glyph_covered
(
&
cache
->
gsub
.
table
,
subtable_offset
+
coverage
,
glyph
);
coverage_index
=
opentype_layout_is_glyph_covered
(
gsub
,
subtable_offset
+
coverage
,
glyph
);
if
(
coverage_index
==
GLYPH_NOT_COVERED
||
coverage_index
>=
count
)
continue
;
...
...
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