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
08fcdd5f
Commit
08fcdd5f
authored
Dec 20, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Dec 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Move the application of pair values to a helper function.
parent
79cbcf96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
21 deletions
+27
-21
opentype.c
dlls/usp10/opentype.c
+27
-21
No files found.
dlls/usp10/opentype.c
View file @
08fcdd5f
...
...
@@ -1186,6 +1186,30 @@ static VOID GPOS_apply_SingleAdjustment(const OT_LookupTable *look, const WORD *
}
}
static
void
apply_pair_value
(
const
void
*
pos_table
,
WORD
val_fmt1
,
WORD
val_fmt2
,
const
WORD
*
pair
,
INT
ppem
,
POINT
*
adjust
,
POINT
*
advance
)
{
GPOS_ValueRecord
val_rec1
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
GPOS_ValueRecord
val_rec2
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
INT
size
;
size
=
GPOS_get_value_record
(
val_fmt1
,
pair
,
&
val_rec1
);
GPOS_get_value_record
(
val_fmt2
,
pair
+
size
,
&
val_rec2
);
if
(
val_fmt1
)
{
GPOS_get_value_record_offsets
(
pos_table
,
&
val_rec1
,
val_fmt1
,
ppem
,
adjust
,
advance
);
TRACE
(
"Glyph 1 resulting cumulative offset is %i,%i design units
\n
"
,
adjust
[
0
].
x
,
adjust
[
0
].
y
);
TRACE
(
"Glyph 1 resulting cumulative advance is %i,%i design units
\n
"
,
advance
[
0
].
x
,
advance
[
0
].
y
);
}
if
(
val_fmt2
)
{
GPOS_get_value_record_offsets
(
pos_table
,
&
val_rec2
,
val_fmt2
,
ppem
,
adjust
+
1
,
advance
+
1
);
TRACE
(
"Glyph 2 resulting cumulative offset is %i,%i design units
\n
"
,
adjust
[
1
].
x
,
adjust
[
1
].
y
);
TRACE
(
"Glyph 2 resulting cumulative advance is %i,%i design units
\n
"
,
advance
[
1
].
x
,
advance
[
1
].
y
);
}
}
static
INT
GPOS_apply_PairAdjustment
(
const
OT_LookupTable
*
look
,
const
WORD
*
glyphs
,
INT
glyph_index
,
INT
write_dir
,
INT
glyph_count
,
INT
ppem
,
LPPOINT
ptAdjust
,
LPPOINT
ptAdvance
)
{
int
j
;
...
...
@@ -1222,28 +1246,10 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const WORD *gly
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
};
TRACE
(
"Format 1: Found Pair %x,%x
\n
"
,
glyphs
[
glyph_index
],
glyphs
[
glyph_index
+
write_dir
]);
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
]);
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_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
;
apply_pair_value
(
ppf1
,
ValueFormat1
,
ValueFormat2
,
pair_val_rec
->
Value1
,
ppem
,
ptAdjust
,
ptAdvance
);
if
(
ValueFormat2
)
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