예제 #1
0
        protected override void ReadContentFrom(BinaryReader reader)
        {
            //Type  Name    Description
            //USHORT    version     Version number (set to 1)
            //USHORT    numRanges   Number of records to follow
            //GASPRANGE     gaspRange[numRanges]    Sorted by ppem

            //Each GASPRANGE record looks like this:
            //Type  Name    Description
            //USHORT    rangeMaxPPEM    Upper limit of range, in PPEM
            //USHORT    rangeGaspBehavior   Flags describing desired rasterizer behavior.
            ushort version   = reader.ReadUInt16();
            ushort numRanges = reader.ReadUInt16();

            _rangeRecords = new GaspRangeRecord[numRanges];
            for (int i = 0; i < numRanges; ++i)
            {
                _rangeRecords[i] = new GaspRangeRecord(
                    reader.ReadUInt16(),
                    (GaspRangeBehavior)reader.ReadUInt16());
            }
        }
예제 #2
0
        protected override void ReadContentFrom(BinaryReader reader)
        {

            //Type 	Name 	Description
            //USHORT 	version 	Version number (set to 1)
            //USHORT 	numRanges 	Number of records to follow
            //GASPRANGE 	gaspRange[numRanges] 	Sorted by ppem

            //Each GASPRANGE record looks like this:
            //Type 	Name 	Description
            //USHORT 	rangeMaxPPEM 	Upper limit of range, in PPEM
            //USHORT 	rangeGaspBehavior 	Flags describing desired rasterizer behavior.
            ushort version = reader.ReadUInt16();
            ushort numRanges = reader.ReadUInt16();
            rangeRecords = new GaspRangeRecord[numRanges];
            for (int i = 0; i < numRanges; ++i)
            {
                rangeRecords[i] = new GaspRangeRecord(
                    reader.ReadUInt16(),
                    (GaspRangeBehavior)reader.ReadUInt16());
            }
        }