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
e5c6a7be
Commit
e5c6a7be
authored
May 26, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Update glyph properties on single substitution.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a294f755
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
opentype.c
dlls/dwrite/opentype.c
+18
-10
No files found.
dlls/dwrite/opentype.c
View file @
e5c6a7be
...
...
@@ -3137,7 +3137,7 @@ static unsigned int opentype_set_glyph_props(struct scriptshaping_context *conte
if
(
cache
->
gdef
.
classdef
)
{
glyph_class
=
opentype_layout_get_glyph_class
(
&
cache
->
gdef
.
table
,
cache
->
gdef
.
classdef
,
context
->
u
.
subst
.
glyphs
[
g
]
);
glyph_class
=
opentype_layout_get_glyph_class
(
&
cache
->
gdef
.
table
,
cache
->
gdef
.
classdef
,
glyph
);
}
switch
(
glyph_class
)
...
...
@@ -3160,6 +3160,13 @@ static unsigned int opentype_set_glyph_props(struct scriptshaping_context *conte
return
props
;
}
static
void
opentype_set_subst_glyph_props
(
struct
scriptshaping_context
*
context
,
unsigned
int
g
,
UINT16
glyph
)
{
unsigned
int
glyph_props
=
opentype_set_glyph_props
(
context
,
g
,
glyph
);
context
->
u
.
subst
.
glyph_props
[
g
].
isDiacritic
=
!!
(
glyph_props
==
GLYPH_PROP_MARK
);
context
->
u
.
subst
.
glyph_props
[
g
].
isZeroWidthSpace
=
!!
(
glyph_props
==
GLYPH_PROP_MARK
);
}
struct
coverage_compare_format1_context
{
UINT16
glyph
;
...
...
@@ -4419,15 +4426,14 @@ 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
)
{
UINT16
format
,
coverage
,
orig_glyph
=
iter
->
context
->
u
.
subst
.
glyphs
[
iter
->
pos
],
glyph
=
orig_glyph
;
struct
scriptshaping_cache
*
cache
=
iter
->
context
->
cache
;
const
struct
dwrite_fonttable
*
gsub
=
&
cache
->
gsub
.
table
;
UINT16
format
,
coverage
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
lookup
->
subtable_count
;
++
i
)
{
unsigned
int
subtable_offset
=
opentype_layout_get_gsub_subtable
(
cache
,
lookup
->
offset
,
i
);
UINT16
glyph
=
iter
->
context
->
u
.
subst
.
glyphs
[
iter
->
pos
];
unsigned
int
coverage_index
;
format
=
table_read_be_word
(
&
cache
->
gsub
.
table
,
subtable_offset
);
...
...
@@ -4443,7 +4449,7 @@ static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator
if
(
coverage_index
==
GLYPH_NOT_COVERED
)
continue
;
iter
->
context
->
u
.
subst
.
glyphs
[
iter
->
pos
]
=
glyph
+
GET_BE_WORD
(
format1
->
delta
);
glyph
=
orig_
glyph
+
GET_BE_WORD
(
format1
->
delta
);
break
;
}
else
if
(
format
==
2
)
...
...
@@ -4456,13 +4462,19 @@ static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator
if
(
coverage_index
==
GLYPH_NOT_COVERED
||
coverage_index
>=
count
)
continue
;
iter
->
context
->
u
.
subst
.
glyphs
[
iter
->
pos
]
=
GET_BE_WORD
(
format2
->
substitutes
[
coverage_index
]);
glyph
=
GET_BE_WORD
(
format2
->
substitutes
[
coverage_index
]);
break
;
}
else
WARN
(
"Unknown single substitution format %u.
\n
"
,
format
);
}
if
(
glyph
!=
orig_glyph
)
{
iter
->
context
->
u
.
subst
.
glyphs
[
iter
->
pos
]
=
glyph
;
opentype_set_subst_glyph_props
(
iter
->
context
,
iter
->
pos
,
glyph
);
}
return
FALSE
;
}
...
...
@@ -4762,11 +4774,7 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c
context
->
u
.
subst
.
glyphs
[
g
]
=
font
->
get_glyph
(
context
->
cache
->
context
,
codepoint
);
context
->
u
.
subst
.
glyph_props
[
g
].
justification
=
SCRIPT_JUSTIFY_CHARACTER
;
context
->
u
.
subst
.
glyph_props
[
g
].
isClusterStart
=
1
;
if
(
opentype_set_glyph_props
(
context
,
g
,
context
->
u
.
subst
.
glyphs
[
g
])
==
GLYPH_PROP_MARK
)
{
context
->
u
.
subst
.
glyph_props
[
g
].
isDiacritic
=
1
;
context
->
u
.
subst
.
glyph_props
[
g
].
isZeroWidthSpace
=
1
;
}
opentype_set_subst_glyph_props
(
context
,
g
,
context
->
u
.
subst
.
glyphs
[
g
]);
context
->
glyph_count
++
;
clustermap
[
i
]
=
i
;
...
...
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