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
a1346937
Commit
a1346937
authored
Jun 17, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Simplify single substitution handler.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
36bdf3db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
19 deletions
+14
-19
opentype.c
dlls/dwrite/opentype.c
+14
-19
No files found.
dlls/dwrite/opentype.c
View file @
a1346937
...
...
@@ -4793,38 +4793,33 @@ static void opentype_layout_replace_glyph(struct scriptshaping_context *context,
static
BOOL
opentype_layout_apply_gsub_single_substitution
(
struct
scriptshaping_context
*
context
,
const
struct
lookup
*
lookup
,
unsigned
int
subtable_offset
)
{
const
struct
dwrite_fonttable
*
gsub
=
&
context
->
table
->
table
;
const
struct
dwrite_fonttable
*
table
=
&
context
->
table
->
table
;
UINT16
format
,
coverage
,
orig_glyph
,
glyph
;
unsigned
int
idx
,
coverage_index
;
unsigned
int
coverage_index
;
idx
=
context
->
cur
;
orig_glyph
=
glyph
=
context
->
u
.
subst
.
glyphs
[
idx
];
orig_glyph
=
glyph
=
context
->
u
.
subst
.
glyphs
[
context
->
cur
];
format
=
table_read_be_word
(
gsub
,
subtable_offset
);
format
=
table_read_be_word
(
table
,
subtable_offset
);
coverage
=
table_read_be_word
(
gsub
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_singlesubst_format1
,
coverage
));
coverage
=
table_read_be_word
(
table
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_singlesubst_format1
,
coverage
));
if
(
format
==
1
)
{
const
struct
ot_gsub_singlesubst_format1
*
format1
=
table_read_ensure
(
gsub
,
subtable_offset
,
sizeof
(
*
format1
));
coverage_index
=
opentype_layout_is_glyph_covered
(
gsub
,
subtable_offset
+
coverage
,
glyph
);
if
(
coverage_index
==
GLYPH_NOT_COVERED
)
return
FALSE
;
coverage_index
=
opentype_layout_is_glyph_covered
(
table
,
subtable_offset
+
coverage
,
glyph
);
if
(
coverage_index
==
GLYPH_NOT_COVERED
)
return
FALSE
;
glyph
=
orig_glyph
+
GET_BE_WORD
(
format1
->
delta
);
glyph
=
orig_glyph
+
table_read_be_word
(
table
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_singlesubst_format1
,
delta
)
);
}
else
if
(
format
==
2
)
{
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
(
table
,
subtable_offset
+
coverage
,
glyph
);
if
(
coverage_index
==
GLYPH_NOT_COVERED
)
return
FALSE
;
coverage_index
=
opentype_layout_is_glyph_covered
(
gsub
,
subtable_offset
+
coverage
,
glyph
);
if
(
coverage_index
==
GLYPH_NOT_COVERED
||
coverage_index
>=
count
)
if
(
!
table_read_array_be_word
(
table
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_singlesubst_format2
,
count
),
coverage_index
,
&
glyph
))
{
return
FALSE
;
glyph
=
GET_BE_WORD
(
format2
->
substitutes
[
coverage_index
]);
}
}
else
{
...
...
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