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
4ae8191e
Commit
4ae8191e
authored
Jan 22, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/arabic: Set per-glyph mask.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bea9c706
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
dwrite_private.h
dlls/dwrite/dwrite_private.h
+2
-0
opentype.c
dlls/dwrite/opentype.c
+6
-0
arabic.c
dlls/dwrite/shapers/arabic.c
+15
-0
No files found.
dlls/dwrite/dwrite_private.h
View file @
4ae8191e
...
...
@@ -590,6 +590,8 @@ extern void shape_enable_feature(struct shaping_features *features, unsigned int
unsigned
int
flags
)
DECLSPEC_HIDDEN
;
extern
void
shape_add_feature_full
(
struct
shaping_features
*
features
,
unsigned
int
tag
,
unsigned
int
flags
,
unsigned
int
value
)
DECLSPEC_HIDDEN
;
extern
unsigned
int
shape_get_feature_1_mask
(
const
struct
shaping_features
*
features
,
unsigned
int
tag
)
DECLSPEC_HIDDEN
;
extern
void
shape_start_next_stage
(
struct
shaping_features
*
features
,
stage_func
func
)
DECLSPEC_HIDDEN
;
struct
scriptshaping_context
...
...
dlls/dwrite/opentype.c
View file @
4ae8191e
...
...
@@ -4632,6 +4632,12 @@ static unsigned int shaping_features_get_mask(const struct shaping_features *fea
return
feature
->
mask
;
}
unsigned
int
shape_get_feature_1_mask
(
const
struct
shaping_features
*
features
,
unsigned
int
tag
)
{
unsigned
int
shift
,
mask
=
shaping_features_get_mask
(
features
,
tag
,
&
shift
);
return
(
1
<<
shift
)
&
mask
;
}
static
void
opentype_layout_get_glyph_range_for_text
(
struct
scriptshaping_context
*
context
,
unsigned
int
start_char
,
unsigned
int
end_char
,
unsigned
int
*
start_glyph
,
unsigned
int
*
end_glyph
)
{
...
...
dlls/dwrite/shapers/arabic.c
View file @
4ae8191e
...
...
@@ -41,6 +41,7 @@ enum arabic_shaping_action
MED2
,
INIT
,
NONE
,
NUM_FEATURES
=
NONE
,
};
static
BOOL
feature_is_syriac
(
unsigned
int
tag
)
...
...
@@ -134,10 +135,17 @@ static void arabic_set_shaping_action(struct scriptshaping_context *context,
context
->
glyph_infos
[
idx
].
props
|=
(
action
&
0xf
)
<<
16
;
}
static
enum
arabic_shaping_action
arabic_get_shaping_action
(
const
struct
scriptshaping_context
*
context
,
unsigned
int
idx
)
{
return
(
context
->
glyph_infos
[
idx
].
props
>>
16
)
&
0xf
;
}
static
void
arabic_setup_masks
(
struct
scriptshaping_context
*
context
,
const
struct
shaping_features
*
features
)
{
unsigned
int
i
,
prev
=
~
0u
,
state
=
0
;
unsigned
int
masks
[
NUM_FEATURES
];
for
(
i
=
0
;
i
<
context
->
length
;
++
i
)
{
...
...
@@ -160,6 +168,13 @@ static void arabic_setup_masks(struct scriptshaping_context *context,
prev
=
i
;
state
=
entry
->
next_state
;
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
masks
);
++
i
)
masks
[
i
]
=
shape_get_feature_1_mask
(
features
,
arabic_features
[
i
]);
/* Unaffected glyphs get action NONE with zero mask. */
for
(
i
=
0
;
i
<
context
->
length
;
++
i
)
context
->
glyph_infos
[
i
].
mask
|=
masks
[
arabic_get_shaping_action
(
context
,
i
)];
}
const
struct
shaper
arabic_shaper
=
...
...
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