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
91181605
Commit
91181605
authored
Jan 18, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Set lookup flags for joiners.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
03fcb54c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
14 deletions
+24
-14
dwrite_private.h
dlls/dwrite/dwrite_private.h
+3
-0
opentype.c
dlls/dwrite/opentype.c
+15
-8
shape.c
dlls/dwrite/shape.c
+6
-6
No files found.
dlls/dwrite/dwrite_private.h
View file @
91181605
...
...
@@ -615,6 +615,9 @@ enum shaping_feature_flags
{
FEATURE_GLOBAL
=
0x1
,
FEATURE_GLOBAL_SEARCH
=
0x2
,
FEATURE_MANUAL_ZWNJ
=
0x4
,
FEATURE_MANUAL_ZWJ
=
0x8
,
FEATURE_MANUAL_JOINERS
=
FEATURE_MANUAL_ZWNJ
|
FEATURE_MANUAL_ZWJ
,
};
struct
shaping_feature
...
...
dlls/dwrite/opentype.c
View file @
91181605
...
...
@@ -3508,6 +3508,8 @@ struct lookup
unsigned
int
mask
;
unsigned
int
offset
;
unsigned
int
auto_zwnj
:
1
;
unsigned
int
auto_zwj
:
1
;
};
static
unsigned
int
opentype_layout_get_gsubgpos_subtable
(
const
struct
scriptshaping_context
*
context
,
...
...
@@ -4337,8 +4339,8 @@ static int lookups_sorting_compare(const void *a, const void *b)
return
left
->
index
<
right
->
index
?
-
1
:
left
->
index
>
right
->
index
?
1
:
0
;
};
static
BOOL
opentype_layout_init_lookup
(
const
struct
ot_gsubgpos_table
*
table
,
unsigned
short
lookup_index
,
unsigned
int
mask
,
struct
lookup
*
lookup
)
static
BOOL
opentype_layout_init_lookup
(
const
struct
ot_gsubgpos_table
*
table
,
unsigned
short
lookup_index
,
const
struct
shaping_feature
*
feature
,
struct
lookup
*
lookup
)
{
unsigned
short
subtable_count
,
lookup_type
,
flags
,
mark_filtering_set
;
const
struct
ot_lookup_table
*
lookup_table
;
...
...
@@ -4372,8 +4374,13 @@ static BOOL opentype_layout_init_lookup(const struct ot_gsubgpos_table *table, u
lookup
->
type
=
lookup_type
;
lookup
->
flags
=
flags
;
lookup
->
subtable_count
=
subtable_count
;
lookup
->
mask
=
mask
;
lookup
->
offset
=
offset
;
if
(
feature
)
{
lookup
->
mask
=
feature
->
mask
;
lookup
->
auto_zwnj
=
!
(
feature
->
flags
&
FEATURE_MANUAL_ZWNJ
);
lookup
->
auto_zwj
=
!
(
feature
->
flags
&
FEATURE_MANUAL_ZWJ
);
}
return
TRUE
;
}
...
...
@@ -4409,7 +4416,7 @@ static void opentype_layout_add_lookups(const struct ot_feature_list *feature_li
if
(
lookup_index
>=
total_lookup_count
)
continue
;
if
(
opentype_layout_init_lookup
(
table
,
lookup_index
,
feature
->
mask
,
&
lookups
->
lookups
[
lookups
->
count
]))
if
(
opentype_layout_init_lookup
(
table
,
lookup_index
,
feature
,
&
lookups
->
lookups
[
lookups
->
count
]))
lookups
->
count
++
;
}
}
...
...
@@ -4567,6 +4574,8 @@ static void opentype_layout_collect_lookups(struct scriptshaping_context *contex
else
{
lookups
->
lookups
[
j
].
mask
|=
lookups
->
lookups
[
i
].
mask
;
lookups
->
lookups
[
j
].
auto_zwnj
&=
lookups
->
lookups
[
i
].
auto_zwnj
;
lookups
->
lookups
[
j
].
auto_zwj
&=
lookups
->
lookups
[
i
].
auto_zwj
;
}
}
lookups
->
count
=
j
+
1
;
...
...
@@ -4648,8 +4657,7 @@ static void opentype_layout_set_glyph_masks(struct scriptshaping_context *contex
static
void
opentype_layout_apply_gpos_context_lookup
(
struct
scriptshaping_context
*
context
,
unsigned
int
lookup_index
)
{
struct
lookup
lookup
=
{
0
};
/* Feature mask is intentionally zero, it's not used outside of main loop. */
if
(
opentype_layout_init_lookup
(
context
->
table
,
lookup_index
,
0
,
&
lookup
))
if
(
opentype_layout_init_lookup
(
context
->
table
,
lookup_index
,
NULL
,
&
lookup
))
opentype_layout_apply_gpos_lookup
(
context
,
&
lookup
);
}
...
...
@@ -5742,8 +5750,7 @@ static BOOL opentype_is_gsub_lookup_reversed(const struct scriptshaping_context
static
void
opentype_layout_apply_gsub_context_lookup
(
struct
scriptshaping_context
*
context
,
unsigned
int
lookup_index
)
{
struct
lookup
lookup
=
{
0
};
/* Feature mask is intentionally zero, it's not used outside of main loop. */
if
(
opentype_layout_init_lookup
(
context
->
table
,
lookup_index
,
0
,
&
lookup
))
if
(
opentype_layout_init_lookup
(
context
->
table
,
lookup_index
,
NULL
,
&
lookup
))
opentype_layout_apply_gsub_lookup
(
context
,
&
lookup
);
}
...
...
dlls/dwrite/shape.c
View file @
91181605
...
...
@@ -189,12 +189,12 @@ static void shape_merge_features(struct scriptshaping_context *context, struct s
HRESULT
shape_get_positions
(
struct
scriptshaping_context
*
context
,
const
unsigned
int
*
scripts
)
{
static
const
unsigned
int
common_features
[]
=
static
const
struct
shaping_feature
common_features
[]
=
{
DWRITE_MAKE_OPENTYPE_TAG
(
'a'
,
'b'
,
'v'
,
'm'
)
,
DWRITE_MAKE_OPENTYPE_TAG
(
'b'
,
'l'
,
'w'
,
'm'
)
,
DWRITE_MAKE_OPENTYPE_TAG
(
'm'
,
'a'
,
'r'
,
'k'
)
,
DWRITE_MAKE_OPENTYPE_TAG
(
'm'
,
'k'
,
'm'
,
'k'
)
,
{
DWRITE_MAKE_OPENTYPE_TAG
(
'a'
,
'b'
,
'v'
,
'm'
)
}
,
{
DWRITE_MAKE_OPENTYPE_TAG
(
'b'
,
'l'
,
'w'
,
'm'
)
}
,
{
DWRITE_MAKE_OPENTYPE_TAG
(
'm'
,
'a'
,
'r'
,
'k'
),
FEATURE_MANUAL_JOINERS
}
,
{
DWRITE_MAKE_OPENTYPE_TAG
(
'm'
,
'k'
,
'm'
,
'k'
),
FEATURE_MANUAL_JOINERS
}
,
};
static
const
unsigned
int
horizontal_features
[]
=
{
...
...
@@ -207,7 +207,7 @@ HRESULT shape_get_positions(struct scriptshaping_context *context, const unsigne
struct
shaping_features
features
=
{
0
};
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
common_features
);
++
i
)
shape_add_feature
(
&
features
,
common_features
[
i
]
);
shape_add_feature
_full
(
&
features
,
common_features
[
i
].
tag
,
FEATURE_GLOBAL
|
common_features
[
i
].
flags
,
1
);
/* Horizontal features */
if
(
!
context
->
is_sideways
)
...
...
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