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
b8f1aed6
Commit
b8f1aed6
authored
May 04, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Add separate structure for top level gsub/gpos offsets.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9763f518
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
20 deletions
+23
-20
dwrite_private.h
dlls/dwrite/dwrite_private.h
+9
-7
opentype.c
dlls/dwrite/opentype.c
+14
-13
No files found.
dlls/dwrite/dwrite_private.h
View file @
b8f1aed6
...
@@ -434,19 +434,21 @@ enum SCRIPT_JUSTIFY
...
@@ -434,19 +434,21 @@ enum SCRIPT_JUSTIFY
SCRIPT_JUSTIFY_ARABIC_SEEN_M
SCRIPT_JUSTIFY_ARABIC_SEEN_M
};
};
struct
ot_gsubgpos_table
{
struct
dwrite_fonttable
table
;
unsigned
int
script_list
;
unsigned
int
feature_list
;
unsigned
int
lookup_list
;
};
struct
scriptshaping_cache
struct
scriptshaping_cache
{
{
const
struct
shaping_font_ops
*
font
;
const
struct
shaping_font_ops
*
font
;
void
*
context
;
void
*
context
;
UINT16
upem
;
UINT16
upem
;
struct
struct
ot_gsubgpos_table
gpos
;
{
struct
dwrite_fonttable
table
;
unsigned
int
script_list
;
unsigned
int
feature_list
;
unsigned
int
lookup_list
;
}
gpos
;
struct
struct
{
{
...
...
dlls/dwrite/opentype.c
View file @
b8f1aed6
...
@@ -2962,10 +2962,11 @@ void opentype_layout_scriptshaping_cache_init(struct scriptshaping_cache *cache)
...
@@ -2962,10 +2962,11 @@ void opentype_layout_scriptshaping_cache_init(struct scriptshaping_cache *cache)
cache
->
gdef
.
classdef
=
table_read_be_word
(
&
cache
->
gdef
.
table
,
FIELD_OFFSET
(
struct
gdef_header
,
classdef
));
cache
->
gdef
.
classdef
=
table_read_be_word
(
&
cache
->
gdef
.
table
,
FIELD_OFFSET
(
struct
gdef_header
,
classdef
));
}
}
DWORD
opentype_layout_find_script
(
const
struct
scriptshaping_cache
*
cache
,
DWORD
kind
,
DWORD
script
,
unsigned
int
opentype_layout_find_script
(
const
struct
scriptshaping_cache
*
cache
,
unsigned
int
kind
,
DWORD
script
,
unsigned
int
*
script_index
)
unsigned
int
*
script_index
)
{
{
WORD
script_count
;
const
struct
ot_gsubgpos_table
*
table
=
&
cache
->
gpos
;
UINT16
script_count
;
unsigned
int
i
;
unsigned
int
i
;
*
script_index
=
~
0u
;
*
script_index
=
~
0u
;
...
@@ -2973,14 +2974,14 @@ DWORD opentype_layout_find_script(const struct scriptshaping_cache *cache, DWORD
...
@@ -2973,14 +2974,14 @@ DWORD opentype_layout_find_script(const struct scriptshaping_cache *cache, DWORD
if
(
kind
!=
MS_GPOS_TAG
)
if
(
kind
!=
MS_GPOS_TAG
)
return
0
;
return
0
;
script_count
=
table_read_be_word
(
&
cache
->
gpos
.
table
,
cache
->
gpos
.
script_list
);
script_count
=
table_read_be_word
(
&
table
->
table
,
table
->
script_list
);
if
(
!
script_count
)
if
(
!
script_count
)
return
0
;
return
0
;
for
(
i
=
0
;
i
<
script_count
;
i
++
)
for
(
i
=
0
;
i
<
script_count
;
i
++
)
{
{
DWORD
tag
=
table_read_dword
(
&
cache
->
gpos
.
table
,
cache
->
gpos
.
script_list
+
unsigned
int
tag
=
table_read_dword
(
&
table
->
table
,
table
->
script_list
+
FIELD_OFFSET
(
struct
ot_script_list
,
scripts
)
+
FIELD_OFFSET
(
struct
ot_script_list
,
scripts
)
+
i
*
sizeof
(
struct
ot_script_record
));
i
*
sizeof
(
struct
ot_script_record
));
if
(
!
tag
)
if
(
!
tag
)
continue
;
continue
;
...
@@ -2994,10 +2995,11 @@ DWORD opentype_layout_find_script(const struct scriptshaping_cache *cache, DWORD
...
@@ -2994,10 +2995,11 @@ DWORD opentype_layout_find_script(const struct scriptshaping_cache *cache, DWORD
return
0
;
return
0
;
}
}
DWORD
opentype_layout_find_language
(
const
struct
scriptshaping_cache
*
cache
,
DWORD
kind
,
DWORD
language
,
unsigned
int
opentype_layout_find_language
(
const
struct
scriptshaping_cache
*
cache
,
unsigned
int
kind
,
DWORD
language
,
unsigned
int
script_index
,
unsigned
int
*
language_index
)
unsigned
int
script_index
,
unsigned
int
*
language_index
)
{
{
WORD
table_offset
,
lang_count
;
const
struct
ot_gsubgpos_table
*
table
=
&
cache
->
gpos
;
UINT16
table_offset
,
lang_count
;
unsigned
int
i
;
unsigned
int
i
;
*
language_index
=
~
0u
;
*
language_index
=
~
0u
;
...
@@ -3005,17 +3007,16 @@ DWORD opentype_layout_find_language(const struct scriptshaping_cache *cache, DWO
...
@@ -3005,17 +3007,16 @@ DWORD opentype_layout_find_language(const struct scriptshaping_cache *cache, DWO
if
(
kind
!=
MS_GPOS_TAG
)
if
(
kind
!=
MS_GPOS_TAG
)
return
0
;
return
0
;
table_offset
=
table_read_be_word
(
&
cache
->
gpos
.
table
,
cache
->
gpos
.
script_list
+
table_offset
=
table_read_be_word
(
&
table
->
table
,
table
->
script_list
+
FIELD_OFFSET
(
struct
ot_script_list
,
scripts
)
+
FIELD_OFFSET
(
struct
ot_script_list
,
scripts
)
+
script_index
*
sizeof
(
struct
ot_script_record
)
+
script_index
*
sizeof
(
struct
ot_script_record
)
+
FIELD_OFFSET
(
struct
ot_script_record
,
script
));
FIELD_OFFSET
(
struct
ot_script_record
,
script
));
if
(
!
table_offset
)
if
(
!
table_offset
)
return
0
;
return
0
;
lang_count
=
table_read_be_word
(
&
cache
->
gpos
.
table
,
cache
->
gpos
.
script_list
+
table_offset
+
lang_count
=
table_read_be_word
(
&
table
->
table
,
table
->
script_list
+
table_offset
+
FIELD_OFFSET
(
struct
ot_script
,
langsys_count
));
FIELD_OFFSET
(
struct
ot_script
,
langsys_count
));
for
(
i
=
0
;
i
<
lang_count
;
i
++
)
for
(
i
=
0
;
i
<
lang_count
;
i
++
)
{
{
DWORD
tag
=
table_read_dword
(
&
cache
->
gpos
.
table
,
cache
->
gpos
.
script_list
+
table_offset
+
unsigned
int
tag
=
table_read_dword
(
&
table
->
table
,
table
->
script_list
+
table_offset
+
FIELD_OFFSET
(
struct
ot_script
,
langsys
)
+
i
*
sizeof
(
struct
ot_langsys_record
));
FIELD_OFFSET
(
struct
ot_script
,
langsys
)
+
i
*
sizeof
(
struct
ot_langsys_record
));
if
(
tag
==
language
)
if
(
tag
==
language
)
...
@@ -3026,7 +3027,7 @@ DWORD opentype_layout_find_language(const struct scriptshaping_cache *cache, DWO
...
@@ -3026,7 +3027,7 @@ DWORD opentype_layout_find_language(const struct scriptshaping_cache *cache, DWO
}
}
/* Try 'defaultLangSys' if it's set. */
/* Try 'defaultLangSys' if it's set. */
if
(
table_read_be_word
(
&
cache
->
gpos
.
table
,
cache
->
gpos
.
script_list
+
table_offset
))
if
(
table_read_be_word
(
&
table
->
table
,
table
->
script_list
+
table_offset
))
return
~
0u
;
return
~
0u
;
return
0
;
return
0
;
...
...
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