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
496898db
Commit
496898db
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: Add support for format 2 pair adjustments.
parent
08fcdd5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
opentype.c
dlls/usp10/opentype.c
+43
-0
No files found.
dlls/usp10/opentype.c
View file @
496898db
...
...
@@ -352,6 +352,18 @@ typedef struct {
}
GPOS_PairPosFormat1
;
typedef
struct
{
WORD
PosFormat
;
WORD
Coverage
;
WORD
ValueFormat1
;
WORD
ValueFormat2
;
WORD
ClassDef1
;
WORD
ClassDef2
;
WORD
Class1Count
;
WORD
Class2Count
;
WORD
Class1Record
[
1
];
}
GPOS_PairPosFormat2
;
typedef
struct
{
WORD
SecondGlyph
;
WORD
Value1
[
1
];
WORD
Value2
[
1
];
...
...
@@ -1255,6 +1267,37 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const WORD *gly
}
}
}
else
if
(
GET_BE_WORD
(
ppf1
->
PosFormat
)
==
2
)
{
const
GPOS_PairPosFormat2
*
ppf2
=
(
const
GPOS_PairPosFormat2
*
)((
const
BYTE
*
)
look
+
offset
);
int
index
;
WORD
ValueFormat1
=
GET_BE_WORD
(
ppf2
->
ValueFormat1
);
WORD
ValueFormat2
=
GET_BE_WORD
(
ppf2
->
ValueFormat2
);
INT
val_fmt1_size
=
GPOS_get_value_record
(
ValueFormat1
,
NULL
,
NULL
);
INT
val_fmt2_size
=
GPOS_get_value_record
(
ValueFormat2
,
NULL
,
NULL
);
WORD
class1_count
=
GET_BE_WORD
(
ppf2
->
Class1Count
);
WORD
class2_count
=
GET_BE_WORD
(
ppf2
->
Class2Count
);
offset
=
GET_BE_WORD
(
ppf2
->
Coverage
);
index
=
GSUB_is_glyph_covered
(
(
const
BYTE
*
)
ppf2
+
offset
,
glyphs
[
glyph_index
]
);
if
(
index
!=
-
1
)
{
WORD
class1
,
class2
;
class1
=
OT_get_glyph_class
(
(
const
BYTE
*
)
ppf2
+
GET_BE_WORD
(
ppf2
->
ClassDef1
),
glyphs
[
glyph_index
]
);
class2
=
OT_get_glyph_class
(
(
const
BYTE
*
)
ppf2
+
GET_BE_WORD
(
ppf2
->
ClassDef2
),
glyphs
[
glyph_index
+
write_dir
]
);
if
(
class1
<
class1_count
&&
class2
<
class2_count
)
{
const
WORD
*
pair_val
=
ppf2
->
Class1Record
+
(
class1
*
class2_count
+
class2
)
*
(
val_fmt1_size
+
val_fmt2_size
);
int
next
=
1
;
TRACE
(
"Format 2: Found Pair %x,%x
\n
"
,
glyphs
[
glyph_index
],
glyphs
[
glyph_index
+
write_dir
]
);
apply_pair_value
(
ppf2
,
ValueFormat1
,
ValueFormat2
,
pair_val
,
ppem
,
ptAdjust
,
ptAdvance
);
if
(
ValueFormat2
)
next
++
;
return
glyph_index
+
next
;
}
}
}
else
FIXME
(
"Pair Adjustment Positioning: Format %i Unhandled
\n
"
,
GET_BE_WORD
(
ppf1
->
PosFormat
));
}
...
...
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