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
b83216c1
Commit
b83216c1
authored
Dec 19, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Dec 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: PairValueRecord is a variable length struct, so don't use a C array to index into them.
parent
c28897f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
opentype.c
dlls/usp10/opentype.c
+10
-5
No files found.
dlls/usp10/opentype.c
View file @
b83216c1
...
...
@@ -1198,6 +1198,10 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const WORD *gly
if
(
GET_BE_WORD
(
ppf1
->
PosFormat
)
==
1
)
{
int
index
;
WORD
ValueFormat1
=
GET_BE_WORD
(
ppf1
->
ValueFormat1
);
WORD
ValueFormat2
=
GET_BE_WORD
(
ppf1
->
ValueFormat2
);
INT
val_fmt1_size
=
GPOS_get_value_record
(
ValueFormat1
,
NULL
,
NULL
);
INT
val_fmt2_size
=
GPOS_get_value_record
(
ValueFormat2
,
NULL
,
NULL
);
offset
=
GET_BE_WORD
(
ppf1
->
Coverage
);
index
=
GSUB_is_glyph_covered
((
const
BYTE
*
)
ppf1
+
offset
,
glyphs
[
glyph_index
]);
if
(
index
!=
-
1
&&
index
<
GET_BE_WORD
(
ppf1
->
PairSetCount
))
...
...
@@ -1205,24 +1209,24 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const WORD *gly
int
k
;
int
pair_count
;
const
GPOS_PairSet
*
ps
;
const
GPOS_PairValueRecord
*
pair_val_rec
;
offset
=
GET_BE_WORD
(
ppf1
->
PairSetOffset
[
index
]);
ps
=
(
const
GPOS_PairSet
*
)((
const
BYTE
*
)
ppf1
+
offset
);
pair_count
=
GET_BE_WORD
(
ps
->
PairValueCount
);
pair_val_rec
=
ps
->
PairValueRecord
;
for
(
k
=
0
;
k
<
pair_count
;
k
++
)
{
WORD
second_glyph
=
GET_BE_WORD
(
p
s
->
PairValueRecord
[
k
].
SecondGlyph
);
WORD
second_glyph
=
GET_BE_WORD
(
p
air_val_rec
->
SecondGlyph
);
if
(
glyphs
[
glyph_index
+
write_dir
]
==
second_glyph
)
{
int
next
=
1
;
GPOS_ValueRecord
ValueRecord1
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
GPOS_ValueRecord
ValueRecord2
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
WORD
ValueFormat1
=
GET_BE_WORD
(
ppf1
->
ValueFormat1
);
WORD
ValueFormat2
=
GET_BE_WORD
(
ppf1
->
ValueFormat2
);
TRACE
(
"Format 1: Found Pair %x,%x
\n
"
,
glyphs
[
glyph_index
],
glyphs
[
glyph_index
+
write_dir
]);
offset
=
GPOS_get_value_record
(
ValueFormat1
,
ps
->
PairValueRecord
[
k
].
Value1
,
&
ValueRecord1
);
GPOS_get_value_record
(
ValueFormat2
,
(
WORD
*
)((
const
BYTE
*
)(
ps
->
PairValueRecord
[
k
].
Value2
)
+
offset
)
,
&
ValueRecord2
);
GPOS_get_value_record
(
ValueFormat1
,
pair_val_rec
->
Value1
,
&
ValueRecord1
);
GPOS_get_value_record
(
ValueFormat2
,
pair_val_rec
->
Value1
+
val_fmt1_size
,
&
ValueRecord2
);
if
(
ValueFormat1
)
{
GPOS_get_value_record_offsets
((
const
BYTE
*
)
ppf1
,
&
ValueRecord1
,
ValueFormat1
,
ppem
,
&
ptAdjust
[
0
],
&
ptAdvance
[
0
]);
...
...
@@ -1239,6 +1243,7 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const WORD *gly
if
(
next
)
return
glyph_index
+
next
;
}
pair_val_rec
=
(
const
GPOS_PairValueRecord
*
)(
pair_val_rec
->
Value1
+
val_fmt1_size
+
val_fmt2_size
);
}
}
}
...
...
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