提交 f131f00b 编写于 作者: E Elie Roux

compile, move into hb-ot-layout.cc

上级 d0b97353
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "hb-font-private.hh" #include "hb-font-private.hh"
#include "hb-ot-layout-base-table.hh"
#include "hb-ot-cmap-table.hh" #include "hb-ot-cmap-table.hh"
#include "hb-ot-cbdt-table.hh" #include "hb-ot-cbdt-table.hh"
#include "hb-ot-glyf-table.hh" #include "hb-ot-glyf-table.hh"
......
...@@ -109,7 +109,7 @@ struct MinMaxTable { ...@@ -109,7 +109,7 @@ struct MinMaxTable {
ArrayOf<FeatMinMaxRecord> featMinMaxRecordTable; ArrayOf<FeatMinMaxRecord> featMinMaxRecordTable;
public: public:
DEFINE_SIZE_ARRAY (6, featMinMaxRecordTable); DEFINE_SIZE_ARRAY (8, featMinMaxRecordTable);
}; };
...@@ -127,10 +127,10 @@ struct BaseValuesTable { ...@@ -127,10 +127,10 @@ struct BaseValuesTable {
protected: protected:
USHORT defaultIndex; USHORT defaultIndex;
USHORT baseCoordCount; USHORT baseCoordCount;
ArrayOf<BaseCoord> baseCoordTable; OffsetArrayOf<BaseCoord> baseCoordTable;
public: public:
DEFINE_SIZE_ARRAY (4, baseCoordTable); DEFINE_SIZE_ARRAY (6, baseCoordTable);
}; };
...@@ -142,7 +142,7 @@ struct BaseScriptTable { ...@@ -142,7 +142,7 @@ struct BaseScriptTable {
ArrayOf<BaseLangSysRecord> baseLangSysRecordTable; ArrayOf<BaseLangSysRecord> baseLangSysRecordTable;
public: public:
DEFINE_SIZE_ARRAY (6, baseLangSysRecordTable); DEFINE_SIZE_ARRAY (8, baseLangSysRecordTable);
}; };
...@@ -153,7 +153,7 @@ struct BaseScriptRecord { ...@@ -153,7 +153,7 @@ struct BaseScriptRecord {
OffsetTo<BaseScriptTable> baseScript; OffsetTo<BaseScriptTable> baseScript;
public: public:
DEFINE_SIZE_STATIC (4); DEFINE_SIZE_STATIC (6);
}; };
struct BaseScriptList { struct BaseScriptList {
...@@ -163,7 +163,7 @@ struct BaseScriptList { ...@@ -163,7 +163,7 @@ struct BaseScriptList {
ArrayOf<BaseScriptRecord> baseScriptRecordTable; ArrayOf<BaseScriptRecord> baseScriptRecordTable;
public: public:
DEFINE_SIZE_ARRAY (2, baseScriptRecordTable); DEFINE_SIZE_ARRAY (4, baseScriptRecordTable);
}; };
...@@ -182,10 +182,10 @@ struct BaseTagList ...@@ -182,10 +182,10 @@ struct BaseTagList
protected: protected:
USHORT baseTagCount; USHORT baseTagCount;
ArrayOf<BaselineTag> BaseTagListTable; ArrayOf<BaselineTag> baseTagListTable;
public: public:
DEFINE_SIZE_STATIC (4); DEFINE_SIZE_ARRAY (4, baseTagListTable);
}; };
struct VertAxis struct VertAxis
...@@ -210,6 +210,32 @@ struct HorizAxis ...@@ -210,6 +210,32 @@ struct HorizAxis
DEFINE_SIZE_STATIC (4); DEFINE_SIZE_STATIC (4);
}; };
struct BASEFormat1_1
{
protected:
FixedVersion<>version;
OffsetTo<HorizAxis> horizAxis;
OffsetTo<VertAxis> vertAxis;
LOffsetTo<VariationStore> itemVarStore;
public:
DEFINE_SIZE_STATIC (12);
};
struct BASEFormat1_0
{
protected:
FixedVersion<>version;
OffsetTo<HorizAxis> horizAxis;
OffsetTo<VertAxis> vertAxis;
public:
DEFINE_SIZE_STATIC (8);
};
struct BASE struct BASE
{ {
static const hb_tag_t tableTag = HB_OT_TAG_BASE; static const hb_tag_t tableTag = HB_OT_TAG_BASE;
...@@ -217,18 +243,19 @@ struct BASE ...@@ -217,18 +243,19 @@ struct BASE
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (version.sanitize (c) && return_trace (u.version.sanitize (c) &&
likely (version.major == 1)); likely (u.version.major == 1));
} }
protected: protected:
FixedVersion<>version; /* Version of the BASE table: 1.0 or 1.1 */ union {
OffsetTo<HorizAxis> horizAxis; FixedVersion<>version; /* Version of the BASE table: 1.0 or 1.1 */
OffsetTo<VertAxis> vertAxis; BASEFormat1_0 format1_0;
//LOffsetTo<ItemVarStore> itemVarStore; BASEFormat1_1 format1_1;
} u;
public: public:
DEFINE_SIZE_MIN (6); DEFINE_SIZE_UNION (4, version);
}; };
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "hb-open-type-private.hh" #include "hb-open-type-private.hh"
#include "hb-ot-layout-private.hh" #include "hb-ot-layout-private.hh"
#include "hb-ot-layout-base-table.hh"
#include "hb-ot-layout-gdef-table.hh" #include "hb-ot-layout-gdef-table.hh"
#include "hb-ot-layout-gsub-table.hh" #include "hb-ot-layout-gsub-table.hh"
#include "hb-ot-layout-gpos-table.hh" #include "hb-ot-layout-gpos-table.hh"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册