[kerx] Start fleshing out Format6
This commit is contained in:
parent
f6aaad9b4f
commit
22955b23cd
|
@ -225,6 +225,13 @@ struct KerxSubTableFormat4
|
|||
|
||||
struct KerxSubTableFormat6
|
||||
{
|
||||
enum Flags
|
||||
{
|
||||
ValuesAreLong = 0x00000001,
|
||||
};
|
||||
|
||||
inline bool is_long (void) const { return flags & ValuesAreLong; }
|
||||
|
||||
inline bool apply (hb_aat_apply_context_t *c) const
|
||||
{
|
||||
TRACE_APPLY (this);
|
||||
|
@ -241,10 +248,16 @@ struct KerxSubTableFormat6
|
|||
{
|
||||
TRACE_SANITIZE (this);
|
||||
return_trace (likely (c->check_struct (this) &&
|
||||
rowIndexTable.sanitize (c, this) &&
|
||||
columnIndexTable.sanitize (c, this) &&
|
||||
kerningArray.sanitize (c, this) &&
|
||||
kerningVector.sanitize (c, this)));
|
||||
is_long () ?
|
||||
(
|
||||
u.l.rowIndexTable.sanitize (c, this) &&
|
||||
u.l.columnIndexTable.sanitize (c, this) &&
|
||||
u.l.kerningArray.sanitize (c, this)
|
||||
) : (
|
||||
u.s.rowIndexTable.sanitize (c, this) &&
|
||||
u.s.columnIndexTable.sanitize (c, this) &&
|
||||
u.s.kerningArray.sanitize (c, this)
|
||||
)));
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -252,12 +265,23 @@ struct KerxSubTableFormat6
|
|||
HBUINT32 flags;
|
||||
HBUINT16 rowCount;
|
||||
HBUINT16 columnCount;
|
||||
LOffsetTo<Lookup<HBUINT16> > rowIndexTable;
|
||||
LOffsetTo<Lookup<HBUINT16> > columnIndexTable;
|
||||
LOffsetTo<Lookup<HBUINT16> > kerningArray;
|
||||
LOffsetTo<Lookup<HBUINT16> > kerningVector;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
LOffsetTo<Lookup<HBUINT16> > rowIndexTable;
|
||||
LOffsetTo<Lookup<HBUINT16> > columnIndexTable;
|
||||
LOffsetTo<FWORD> kerningArray;
|
||||
} s;
|
||||
struct
|
||||
{
|
||||
LOffsetTo<Lookup<HBUINT32> > rowIndexTable;
|
||||
LOffsetTo<Lookup<HBUINT32> > columnIndexTable;
|
||||
LOffsetTo<FWORD32> kerningArray;
|
||||
} l;
|
||||
} u;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (36);
|
||||
DEFINE_SIZE_STATIC (32);
|
||||
};
|
||||
|
||||
struct KerxTable
|
||||
|
|
|
@ -92,6 +92,9 @@ typedef IntType<uint32_t, 3> HBUINT24; /* 24-bit unsigned integer. */
|
|||
/* 16-bit signed integer (HBINT16) that describes a quantity in FUnits. */
|
||||
typedef HBINT16 FWORD;
|
||||
|
||||
/* 32-bit signed integer (HBINT32) that describes a quantity in FUnits. */
|
||||
typedef HBINT32 FWORD32;
|
||||
|
||||
/* 16-bit unsigned integer (HBUINT16) that describes a quantity in FUnits. */
|
||||
typedef HBUINT16 UFWORD;
|
||||
|
||||
|
|
Loading…
Reference in New Issue