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
3e59649c
Commit
3e59649c
authored
Jun 01, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Add main loop variant for reverse substitution.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db6c4156
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
9 deletions
+41
-9
opentype.c
dlls/dwrite/opentype.c
+41
-9
No files found.
dlls/dwrite/opentype.c
View file @
3e59649c
...
...
@@ -5610,6 +5610,19 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c
}
}
static
BOOL
opentype_is_gsub_lookup_reversed
(
const
struct
scriptshaping_context
*
context
,
const
struct
lookup
*
lookup
)
{
unsigned
int
subtable_offset
,
lookup_type
=
lookup
->
type
;
if
(
lookup
->
type
==
GSUB_LOOKUP_EXTENSION_SUBST
)
{
subtable_offset
=
opentype_layout_get_gsubgpos_subtable
(
context
,
lookup
->
offset
,
0
);
/* Assumes format 1. */
lookup_type
=
table_read_be_word
(
&
context
->
table
->
table
,
subtable_offset
+
2
);
}
return
lookup_type
==
GSUB_LOOKUP_REVERSE_CHAINING_CONTEXTUAL_SUBST
;
}
void
opentype_layout_apply_gsub_features
(
struct
scriptshaping_context
*
context
,
unsigned
int
script_index
,
unsigned
int
language_index
,
const
struct
shaping_features
*
features
)
{
...
...
@@ -5626,19 +5639,38 @@ void opentype_layout_apply_gsub_features(struct scriptshaping_context *context,
{
const
struct
lookup
*
lookup
=
&
lookups
.
lookups
[
i
];
context
->
cur
=
0
;
while
(
context
->
cur
<
context
->
glyph_count
)
if
(
!
opentype_is_gsub_lookup_reversed
(
context
,
lookup
))
{
ret
=
FALSE
;
if
((
context
->
glyph_infos
[
context
->
cur
].
mask
&
lookup
->
mask
)
&&
lookup_is_glyph_match
(
context
,
context
->
cur
,
lookup
->
flags
))
context
->
cur
=
0
;
while
(
context
->
cur
<
context
->
glyph_count
)
{
ret
=
opentype_layout_apply_gsub_lookup
(
context
,
lookup
);
ret
=
FALSE
;
if
((
context
->
glyph_infos
[
context
->
cur
].
mask
&
lookup
->
mask
)
&&
lookup_is_glyph_match
(
context
,
context
->
cur
,
lookup
->
flags
))
{
ret
=
opentype_layout_apply_gsub_lookup
(
context
,
lookup
);
}
if
(
!
ret
)
context
->
cur
++
;
}
}
else
{
context
->
cur
=
context
->
glyph_count
-
1
;
if
(
!
ret
)
context
->
cur
++
;
for
(;;)
{
if
((
context
->
glyph_infos
[
context
->
cur
].
mask
&
lookup
->
mask
)
&&
lookup_is_glyph_match
(
context
,
context
->
cur
,
lookup
->
flags
))
{
opentype_layout_apply_gsub_lookup
(
context
,
lookup
);
}
if
(
context
->
cur
==
0
)
break
;
--
context
->
cur
;
}
}
}
...
...
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