Beispiel #1
0
        //public VariationStore itemVarStore;

        public static BASETable Read(BinaryReaderFont reader)
        {
            long      position = reader.Position;
            BASETable value    = new BASETable {
                majorVersion    = reader.ReadUInt16(),
                minorVersion    = reader.ReadUInt16(),
                horizAxisOffset = reader.ReadUInt16(),
                vertAxisOffset  = reader.ReadUInt16()
            };

            if (value.majorVersion == 1 && value.minorVersion == 1)
            {
                value.itemVarStoreOffset = reader.ReadUInt32();
            }
            if (value.horizAxisOffset != 0)
            {
                reader.Position = position + value.horizAxisOffset;
                value.horizAxis = AxisTable.Read(reader);
            }
            if (value.vertAxisOffset != 0)
            {
                reader.Position = position + value.vertAxisOffset;
                value.vertAxis  = AxisTable.Read(reader);
            }
            if (value.itemVarStoreOffset != 0)
            {
                reader.Position = position + value.itemVarStoreOffset;
                //value.itemVarStore =
            }
            return(value);
        }
Beispiel #2
0
        public static AxisTable Read(BinaryReaderFont reader)
        {
            long      position = reader.Position;
            AxisTable value    = new AxisTable {
                baseTagListOffset    = reader.ReadUInt16(),
                baseScriptListOffset = reader.ReadUInt16()
            };

            if (value.baseTagListOffset != 0)
            {
                reader.Position   = position + value.baseTagListOffset;
                value.baseTagList = BaseTagList.Read(reader);
            }
            if (value.baseScriptListOffset != 0)
            {
                reader.Position      = position + value.baseScriptListOffset;
                value.baseScriptList = BaseScriptList.Read(reader);
            }
            return(value);
        }