示例#1
0
            // generate a new table from the cached data

            public override OTTable GenerateTable()
            {
                // create a Motorola Byte Order buffer for the new table

                MBOBuffer newbuf = new MBOBuffer(54);


                // populate the buffer

                newbuf.SetFixed(m_TableVersion, (uint)Table_head.FieldOffsets.TableVersionNumber);
                newbuf.SetFixed(m_fontRevision, (uint)Table_head.FieldOffsets.fontRevision);
                newbuf.SetUint(m_checkSumAdjustment, (uint)Table_head.FieldOffsets.checkSumAdjustment);
                newbuf.SetUint(m_magicNumber, (uint)Table_head.FieldOffsets.magicNumber);
                newbuf.SetUshort(m_flags, (uint)Table_head.FieldOffsets.flags);
                newbuf.SetUshort(m_unitsPerEm, (uint)Table_head.FieldOffsets.unitsPerEm);
                newbuf.SetLong(m_created, (uint)Table_head.FieldOffsets.created);
                newbuf.SetLong(m_modified, (uint)Table_head.FieldOffsets.modified);
                newbuf.SetShort(m_xMin, (uint)Table_head.FieldOffsets.xMin);
                newbuf.SetShort(m_yMin, (uint)Table_head.FieldOffsets.yMin);
                newbuf.SetShort(m_xMax, (uint)Table_head.FieldOffsets.xMax);
                newbuf.SetShort(m_yMax, (uint)Table_head.FieldOffsets.yMax);
                newbuf.SetUshort(m_macStyle, (uint)Table_head.FieldOffsets.macStyle);
                newbuf.SetUshort(m_lowestRecPPEM, (uint)Table_head.FieldOffsets.lowestRecPPEM);
                newbuf.SetShort(m_fontDirectionHint, (uint)Table_head.FieldOffsets.fontDirectionHint);
                newbuf.SetShort(m_indexToLocFormat, (uint)Table_head.FieldOffsets.indexToLocFormat);
                newbuf.SetShort(m_glyphDataFormat, (uint)Table_head.FieldOffsets.glyphDataFormat);


                // put the buffer into a Table_head object and return it

                Table_head headTable = new Table_head("head", newbuf);

                return(headTable);
            }
示例#2
0
            // generate a new table from the cached data

            public override OTTable GenerateTable()
            {
                // create a Motorola Byte Order buffer for the new table

                MBOBuffer newbuf = new MBOBuffer(54);


                // populate the buffer
                
                newbuf.SetFixed (m_TableVersion,       (uint)Table_head.FieldOffsets.TableVersionNumber);
                newbuf.SetFixed (m_fontRevision,       (uint)Table_head.FieldOffsets.fontRevision);
                newbuf.SetUint  (m_checkSumAdjustment, (uint)Table_head.FieldOffsets.checkSumAdjustment);
                newbuf.SetUint  (m_magicNumber,        (uint)Table_head.FieldOffsets.magicNumber);
                newbuf.SetUshort(m_flags,              (uint)Table_head.FieldOffsets.flags);
                newbuf.SetUshort(m_unitsPerEm,         (uint)Table_head.FieldOffsets.unitsPerEm);
                newbuf.SetLong  (m_created,            (uint)Table_head.FieldOffsets.created);
                newbuf.SetLong  (m_modified,           (uint)Table_head.FieldOffsets.modified);
                newbuf.SetShort (m_xMin,               (uint)Table_head.FieldOffsets.xMin);
                newbuf.SetShort (m_yMin,               (uint)Table_head.FieldOffsets.yMin);
                newbuf.SetShort (m_xMax,               (uint)Table_head.FieldOffsets.xMax);
                newbuf.SetShort (m_yMax,               (uint)Table_head.FieldOffsets.yMax);
                newbuf.SetUshort(m_macStyle,           (uint)Table_head.FieldOffsets.macStyle);
                newbuf.SetUshort(m_lowestRecPPEM,      (uint)Table_head.FieldOffsets.lowestRecPPEM);
                newbuf.SetShort (m_fontDirectionHint,  (uint)Table_head.FieldOffsets.fontDirectionHint);
                newbuf.SetShort (m_indexToLocFormat,   (uint)Table_head.FieldOffsets.indexToLocFormat);
                newbuf.SetShort (m_glyphDataFormat,    (uint)Table_head.FieldOffsets.glyphDataFormat);


                // put the buffer into a Table_head object and return it

                Table_head headTable = new Table_head("head", newbuf);

                return headTable;
            }