public List <SequentialMapGroup> groups; // Array of SequentialMapGroup records. public void Read(TTFReader r, bool readformat = false) { if (readformat == true) { r.ReadInt(out this.format); } else { this.format = 8; } r.ReadInt(out this.reserved); r.ReadInt(out this.length); r.ReadInt(out this.language); this.is32 = new List <byte>(); for (int i = 0; i < 8192; ++i) { this.is32.Add(r.ReadUInt8()); } r.ReadInt(out this.numGroups); this.groups = new List <SequentialMapGroup>(); for (int i = 0; i < this.numGroups; ++i) { SequentialMapGroup smg = new SequentialMapGroup(); smg.Read(r); this.groups.Add(smg); } }
public void Read(TTFReader r) { r.ReadInt(out this.minorVersion); r.ReadInt(out this.majorVersion); this.italicAngle = r.ReadFixed(); r.ReadInt(out this.underlinePosition); r.ReadInt(out this.underlineThickness); r.ReadInt(out this.isFixedPitch); r.ReadInt(out this.minMemType42); r.ReadInt(out this.maxMemType42); r.ReadInt(out this.minMemType1); r.ReadInt(out this.maxMemType1); if (this.majorVersion == 2 && this.minorVersion == 0) { r.ReadInt(out this.numGlyphs); this.glyphNameIndex = new List <ushort>(); for (int i = 0; i < this.numGlyphs; ++i) { this.glyphNameIndex.Add(r.ReadUInt16()); } this.stringData = new List <string>(); //while(r.GetPosition() < end) // this.stringData.Add(r.ReadPascalString()); //for(int i = 0; i < ) } else if (this.majorVersion == 2 && this.minorVersion == 5) { r.ReadInt(out this.numGlyphs); this.offset = new List <byte>(); for (int i = 0; i < this.numGlyphs; ++i) { this.offset.Add(r.ReadUInt8()); } } else if (this.majorVersion == 3 && this.minorVersion == 0) { } // Do nothing }
public List <byte> glyphIdArray; // An array that maps character codes to glyph index values. public void Read(TTFReader r, bool readformat = false) { if (readformat == true) { r.ReadInt(out this.format); } else { this.format = 0; } r.ReadInt(out this.length); r.ReadInt(out this.language); this.glyphIdArray = new List <byte>(); for (int i = 0; i < 256; ++i) { this.glyphIdArray.Add(r.ReadUInt8()); } }
public void Read(TTFReader r) { r.ReadInt(out this.majorVersion); r.ReadInt(out this.minorVersion); r.ReadInt(out this.fontNumber); r.ReadInt(out this.pitch); r.ReadInt(out this.xHeight); r.ReadInt(out this.style); r.ReadInt(out this.typeFamily); r.ReadInt(out this.capHeight); r.ReadInt(out this.symbolSet); this.typeface = r.ReadSBytes(16); this.characterComplement = r.ReadSBytes(8); this.filename = r.ReadSBytes(6); r.ReadInt(out this.strokeWeight); r.ReadInt(out this.widthType); r.ReadInt(out this.serifStyle); // Consume the reserved at the end r.ReadUInt8(); }
public void Read(TTFReader r, int numGlyphs) { r.ReadInt(out this.version); r.ReadInt(out this.numRecords); r.ReadInt(out this.sizeDeviceRecord); this.records = new List <DeviceRecord>(); for (int i = 0; i < this.numRecords; ++i) { DeviceRecord dr = new DeviceRecord(); r.ReadInt(out dr.pixelSize); r.ReadInt(out dr.maxWidth); // dr.widths = new List <byte>(); for (int j = 0; j < numGlyphs; ++j) { dr.widths.Add(r.ReadUInt8()); } this.records.Add(dr); } }