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
78ea46f6
Commit
78ea46f6
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 multiple substitution handler.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a1346937
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
opentype.c
dlls/dwrite/opentype.c
+13
-16
No files found.
dlls/dwrite/opentype.c
View file @
78ea46f6
...
@@ -4862,37 +4862,34 @@ static BOOL opentype_layout_gsub_ensure_buffer(struct scriptshaping_context *con
...
@@ -4862,37 +4862,34 @@ static BOOL opentype_layout_gsub_ensure_buffer(struct scriptshaping_context *con
static
BOOL
opentype_layout_apply_gsub_mult_substitution
(
struct
scriptshaping_context
*
context
,
const
struct
lookup
*
lookup
,
static
BOOL
opentype_layout_apply_gsub_mult_substitution
(
struct
scriptshaping_context
*
context
,
const
struct
lookup
*
lookup
,
unsigned
int
subtable_offset
)
unsigned
int
subtable_offset
)
{
{
const
struct
dwrite_fonttable
*
gsub
=
&
context
->
table
->
table
;
const
struct
dwrite_fonttable
*
table
=
&
context
->
table
->
table
;
UINT16
format
,
coverage
,
glyph
,
seq_count
,
glyph_count
;
UINT16
format
,
coverage
,
glyph
,
glyph_count
;
const
struct
ot_gsub_multsubst_format1
*
format1
;
unsigned
int
i
,
idx
,
coverage_index
;
unsigned
int
i
,
idx
,
coverage_index
;
const
UINT16
*
glyphs
;
const
UINT16
*
glyphs
;
idx
=
context
->
cur
;
idx
=
context
->
cur
;
glyph
=
context
->
u
.
subst
.
glyphs
[
idx
];
glyph
=
context
->
u
.
subst
.
glyphs
[
idx
];
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_multsubst_format1
,
coverage
));
coverage
=
table_read_be_word
(
table
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_multsubst_format1
,
coverage
));
if
(
format
==
1
)
if
(
format
==
1
)
{
{
coverage_index
=
opentype_layout_is_glyph_covered
(
gsub
,
subtable_offset
+
coverage
,
glyph
);
UINT16
seq_offset
;
if
(
coverage_index
==
GLYPH_NOT_COVERED
)
return
FALSE
;
seq_count
=
table_read_be_word
(
gsub
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_multsubst_format1
,
seq_count
));
format1
=
table_read_ensure
(
gsub
,
subtable_offset
,
FIELD_OFFSET
(
struct
ot_gsub_multsubst_format1
,
seq
[
seq_count
]));
coverage_index
=
opentype_layout_is_glyph_covered
(
table
,
subtable_offset
+
coverage
,
glyph
);
if
(
coverage_index
==
GLYPH_NOT_COVERED
)
return
FALSE
;
if
(
!
seq_count
||
seq_count
<=
coverage_index
||
!
format1
)
if
(
!
table_read_array_be_word
(
table
,
subtable_offset
+
FIELD_OFFSET
(
struct
ot_gsub_multsubst_format1
,
seq_count
),
coverage_index
,
&
seq_offset
))
{
return
FALSE
;
return
FALSE
;
}
glyph_count
=
table_read_be_word
(
gsub
,
subtable_offset
+
GET_BE_WORD
(
format1
->
seq
[
coverage_index
])
);
glyph_count
=
table_read_be_word
(
table
,
subtable_offset
+
seq_offset
);
glyphs
=
table_read_ensure
(
gsub
,
subtable_offset
+
GET_BE_WORD
(
format1
->
seq
[
coverage_index
])
+
2
,
if
(
!
(
glyphs
=
table_read_ensure
(
table
,
subtable_offset
+
seq_offset
+
2
,
glyph_count
*
sizeof
(
*
glyphs
))))
glyph_count
*
sizeof
(
*
glyphs
));
if
(
!
glyphs
)
return
FALSE
;
return
FALSE
;
if
(
glyph_count
==
1
)
if
(
glyph_count
==
1
)
...
...
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