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
e2250ce6
Commit
e2250ce6
authored
Aug 14, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Aug 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Correct implementation of Pair Positioning Adjustment: Format 1.
parent
fa7a34b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
32 deletions
+35
-32
opentype.c
dlls/usp10/opentype.c
+35
-32
No files found.
dlls/usp10/opentype.c
View file @
e2250ce6
...
...
@@ -1174,44 +1174,47 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const WORD *gly
ppf1
=
(
const
GPOS_PairPosFormat1
*
)((
const
BYTE
*
)
look
+
offset
);
if
(
GET_BE_WORD
(
ppf1
->
PosFormat
)
==
1
)
{
int
index
;
offset
=
GET_BE_WORD
(
ppf1
->
Coverage
);
if
(
GSUB_is_glyph_covered
((
const
BYTE
*
)
ppf1
+
offset
,
glyphs
[
glyph_index
])
!=
-
1
)
index
=
GSUB_is_glyph_covered
((
const
BYTE
*
)
ppf1
+
offset
,
glyphs
[
glyph_index
]);
if
(
index
!=
-
1
&&
index
<
GET_BE_WORD
(
ppf1
->
PairSetCount
))
{
int
i
;
int
count
=
GET_BE_WORD
(
ppf1
->
PairSetCount
);
for
(
i
=
0
;
i
<
count
;
i
++
)
int
k
;
int
pair_count
;
const
GPOS_PairSet
*
ps
;
offset
=
GET_BE_WORD
(
ppf1
->
PairSetOffset
[
index
]);
ps
=
(
const
GPOS_PairSet
*
)((
const
BYTE
*
)
ppf1
+
offset
);
pair_count
=
GET_BE_WORD
(
ps
->
PairValueCount
);
for
(
k
=
0
;
k
<
pair_count
;
k
++
)
{
int
k
;
int
pair_count
;
const
GPOS_PairSet
*
ps
;
offset
=
GET_BE_WORD
(
ppf1
->
PairSetOffset
[
i
]);
ps
=
(
const
GPOS_PairSet
*
)((
const
BYTE
*
)
ppf1
+
offset
);
pair_count
=
GET_BE_WORD
(
ps
->
PairValueCount
);
for
(
k
=
0
;
k
<
pair_count
;
k
++
)
WORD
second_glyph
=
GET_BE_WORD
(
ps
->
PairValueRecord
[
k
].
SecondGlyph
);
if
(
glyphs
[
glyph_index
+
write_dir
]
==
second_glyph
)
{
if
(
glyphs
[
glyph_index
+
write_dir
]
==
GET_BE_WORD
(
ps
->
PairValueRecord
[
k
].
SecondGlyph
))
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
);
if
(
ValueFormat1
)
{
GPOS_get_value_record_offsets
((
const
BYTE
*
)
ppf1
,
&
ValueRecord1
,
ValueFormat1
,
ppem
,
&
ptAdjust
[
0
],
&
ptAdvance
[
0
]);
TRACE
(
"Glyph 1 resulting cumulative offset is %i,%i design units
\n
"
,
ptAdjust
[
0
].
x
,
ptAdjust
[
0
].
y
);
TRACE
(
"Glyph 1 resulting cumulative advance is %i,%i design units
\n
"
,
ptAdvance
[
0
].
x
,
ptAdvance
[
0
].
y
);
}
if
(
ValueFormat2
)
{
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
);
if
(
ValueFormat1
)
{
GPOS_get_value_record_offsets
((
const
BYTE
*
)
ppf1
,
&
ValueRecord1
,
ValueFormat1
,
ppem
,
&
ptAdjust
[
0
],
&
ptAdvance
[
0
]);
TRACE
(
"Glyph 1 resulting cumulative offset is %i,%i design units
\n
"
,
ptAdjust
[
0
].
x
,
ptAdjust
[
0
].
y
);
}
if
(
ValueFormat2
)
{
GPOS_get_value_record_offsets
((
const
BYTE
*
)
ppf1
,
&
ValueRecord2
,
ValueFormat2
,
ppem
,
&
ptAdjust
[
1
],
&
ptAdvance
[
1
]);
TRACE
(
"Glyph 2 resulting cumulative offset is %i,%i design units
\n
"
,
ptAdjust
[
1
].
x
,
ptAdjust
[
1
].
y
);
return
glyph_index
+
2
;
}
GPOS_get_value_record_offsets
((
const
BYTE
*
)
ppf1
,
&
ValueRecord2
,
ValueFormat2
,
ppem
,
&
ptAdjust
[
1
],
&
ptAdvance
[
1
]);
TRACE
(
"Glyph 2 resulting cumulative offset is %i,%i design units
\n
"
,
ptAdjust
[
1
].
x
,
ptAdjust
[
1
].
y
);
TRACE
(
"Glyph 2 resulting cumulative advance is %i,%i design units
\n
"
,
ptAdvance
[
1
].
x
,
ptAdvance
[
1
].
y
);
next
++
;
}
if
(
next
)
return
glyph_index
+
next
;
}
}
}
...
...
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