提交 30af5b4a 编写于 作者: B Behdad Esfahbod

[kern] Move code

上级 1ff30046
...@@ -235,43 +235,46 @@ struct KernTable ...@@ -235,43 +235,46 @@ struct KernTable
} }
}; };
struct KernOT : KernTable<KernOT>
struct KernOTSubTableHeader
{ {
friend struct KernTable<KernOT>; typedef AAT::ObsoleteTypes Types;
static const uint16_t minVersion = 0; inline unsigned int tuple_count (void) const { return 0; }
inline bool is_horizontal (void) const { return (coverage & Horizontal); }
struct SubTableHeader enum Coverage
{ {
typedef AAT::ObsoleteTypes Types; Horizontal = 0x01u,
Minimum = 0x02u,
CrossStream = 0x04u,
Override = 0x08u,
inline unsigned int tuple_count (void) const { return 0; } Variation = 0x00u, /* Not supported. */
inline bool is_horizontal (void) const { return (coverage & Horizontal); } };
enum Coverage inline bool sanitize (hb_sanitize_context_t *c) const
{ {
Horizontal = 0x01u, TRACE_SANITIZE (this);
Minimum = 0x02u, return_trace (c->check_struct (this));
CrossStream = 0x04u, }
Override = 0x08u,
Variation = 0x00u, /* Not supported. */ public:
}; HBUINT16 versionZ; /* Unused. */
HBUINT16 length; /* Length of the subtable (including this header). */
HBUINT8 format; /* Subtable format. */
HBUINT8 coverage; /* Coverage bits. */
public:
DEFINE_SIZE_STATIC (6);
};
inline bool sanitize (hb_sanitize_context_t *c) const struct KernOT : KernTable<KernOT>
{ {
TRACE_SANITIZE (this); friend struct KernTable<KernOT>;
return_trace (c->check_struct (this));
}
public: typedef KernOTSubTableHeader SubTableHeader;
HBUINT16 versionZ; /* Unused. */
HBUINT16 length; /* Length of the subtable (including this header). */ static const uint16_t minVersion = 0;
HBUINT8 format; /* Subtable format. */
HBUINT8 coverage; /* Coverage bits. */
public:
DEFINE_SIZE_STATIC (6);
};
protected: protected:
HBUINT16 version; /* Version--0x0000u */ HBUINT16 version; /* Version--0x0000u */
...@@ -281,42 +284,45 @@ struct KernOT : KernTable<KernOT> ...@@ -281,42 +284,45 @@ struct KernOT : KernTable<KernOT>
DEFINE_SIZE_MIN (4); DEFINE_SIZE_MIN (4);
}; };
struct KernAAT : KernTable<KernAAT>
struct KernAATSubTableHeader
{ {
friend struct KernTable<KernAAT>; typedef AAT::ObsoleteTypes Types;
static const uint32_t minVersion = 0x00010000u; inline unsigned int tuple_count (void) const { return 0; }
inline bool is_horizontal (void) const { return !(coverage & Vertical); }
struct SubTableHeader enum Coverage
{ {
typedef AAT::ObsoleteTypes Types; Vertical = 0x80u,
CrossStream = 0x40u,
Variation = 0x20u,
};
inline unsigned int tuple_count (void) const { return 0; } inline bool sanitize (hb_sanitize_context_t *c) const
inline bool is_horizontal (void) const { return !(coverage & Vertical); } {
TRACE_SANITIZE (this);
return_trace (c->check_struct (this));
}
enum Coverage public:
{ HBUINT32 length; /* Length of the subtable (including this header). */
Vertical = 0x80u, HBUINT8 coverage; /* Coverage bits. */
CrossStream = 0x40u, HBUINT8 format; /* Subtable format. */
Variation = 0x20u, HBUINT16 tupleIndex; /* The tuple index (used for variations fonts).
}; * This value specifies which tuple this subtable covers.
* Note: We don't implement. */
public:
DEFINE_SIZE_STATIC (8);
};
inline bool sanitize (hb_sanitize_context_t *c) const struct KernAAT : KernTable<KernAAT>
{ {
TRACE_SANITIZE (this); friend struct KernTable<KernAAT>;
return_trace (c->check_struct (this));
}
public: typedef KernAATSubTableHeader SubTableHeader;
HBUINT32 length; /* Length of the subtable (including this header). */
HBUINT8 coverage; /* Coverage bits. */ static const uint32_t minVersion = 0x00010000u;
HBUINT8 format; /* Subtable format. */
HBUINT16 tupleIndex; /* The tuple index (used for variations fonts).
* This value specifies which tuple this subtable covers.
* Note: We don't implement. */
public:
DEFINE_SIZE_STATIC (8);
};
protected: protected:
HBUINT32 version; /* Version--0x00010000u */ HBUINT32 version; /* Version--0x00010000u */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册