public readonly ValueRecord value2;//Positioning data for the second glyph in the pair public PairSet(ushort secondGlyph, ValueRecord v1, ValueRecord v2) { this.secondGlyph = secondGlyph; this.value1 = v1; this.value2 = v2; }
public override void ReadValue(ValueRecord rec, int index, double value) { }
public static ValueRecord CreateFrom(BinaryReader reader, ushort valueFormat) { var v = new ValueRecord(); v.ReadFrom(reader, valueFormat); return v; }
public override void ReadValue(ValueRecord rec, int index, double value) { Assert.AreEqual(value, ((ctr++) / 100.0)); }
public void ReadValue(ValueRecord rec, int index, DateTime value) { this.Verify(value); }
public void ReadValue(ValueRecord rec, int index, Record value) { throw new InvalidOperationException(); }
public LkSubTableType1(ValueRecord[] valueRecords) { this.Format = 2; this.multiValues = valueRecords; }
public void ReadValue(ValueRecord rec, int index, DateTime value) { Console.WriteLine(index + ") Value " + value.ToString()); }
public void ReadValueNull(ValueRecord rec, int index) { this.VerifyNull(); }
public void ReadValue(ValueRecord rec, int index, string value) { Console.WriteLine(index + ") Value " + value); }
public void ReadValue(ValueRecord rec, int index, Record obj) { Console.WriteLine(index + ") Value #" + obj.SequenceNo); }
public void ReadValue(ValueRecord rec, int index, long value) { Console.WriteLine(index + ") Value " + value); //Console.ReadLine(); }
public void ReadValueNull(ValueRecord rec, int index) { Console.WriteLine(index + ") Value null"); }
public ValueRecord GetValue(uint i) { ValueRecord vr = null; if (i < ValueCount) { uint sizeofValueRecord = ValueRecord.SizeOfValueRecord(ValueFormat); uint offset = m_offsetSinglePos + (uint)FieldOffsets.ValueRecordArray + i*sizeofValueRecord; vr = new ValueRecord(offset, m_bufTable, m_offsetSinglePos, ValueFormat); } return vr; }
public readonly ValueRecord value2; //Positioning data for the second glyph in the pair public PairSet(ushort secondGlyph, ValueRecord v1, ValueRecord v2) { this.secondGlyph = secondGlyph; this.value1 = v1; this.value2 = v2; }
public void ReadValue(ValueRecord rec, int index, double value) { this.Verify(value); }
public void ReadValue(ValueRecord rec, int index, long value) { Assert.AreEqual(ctr++, value); }
public void ReadValue(ValueRecord rec, int index, string value) { this.Verify(value); }
public LkSubTableType1(ValueRecord singleValue) { this.Format = 1; this.singleValue = singleValue; }
public void ReadValue(ValueRecord rec, int index, Record obj) { //Console.WriteLine(index + ") Value " + obj.Code.SequenceNo); this.VerifyRefs(obj.SequenceNo); }
/// <summary> /// Lookup Type 1: Single Adjustment Positioning Subtable /// </summary> /// <param name="reader"></param> void ReadLookupType1(BinaryReader reader) { long thisLookupTablePos = reader.BaseStream.Position; int j = subTableOffsets.Length; for (int i = 0; i < j; ++i) { //move to read pos long subTableStartAt = reader.BaseStream.Position + subTableOffsets[i]; reader.BaseStream.Seek(subTableStartAt, SeekOrigin.Begin); //----------------------- ushort format = reader.ReadUInt16(); switch (format) { default: throw new NotSupportedException(); case 1: { //Single Adjustment Positioning: Format 1 // USHORT PosFormat Format identifier-format = 1 //Offset Coverage Offset to Coverage table-from beginning of SinglePos subtable //USHORT ValueFormat Defines the types of data in the ValueRecord //ValueRecord Value Defines positioning value(s)-applied to all glyphs in the Coverage table short coverage = reader.ReadInt16(); ushort valueFormat = reader.ReadUInt16(); var subTable = new LkSubTableType1(ValueRecord.CreateFrom(reader, valueFormat)); //------- subTable.CoverageTable = CoverageTable.CreateFrom(reader, subTableStartAt + coverage); //------- this.subTables.Add(subTable); } break; case 2: { //Single Adjustment Positioning: Format 2 //USHORT PosFormat Format identifier-format = 2 //Offset Coverage Offset to Coverage table-from beginning of SinglePos subtable //USHORT ValueFormat Defines the types of data in the ValueRecord //USHORT ValueCount Number of ValueRecords //ValueRecord Value //[ValueCount] Array of ValueRecords-positioning values applied to glyphs short coverage = reader.ReadInt16(); ushort valueFormat = reader.ReadUInt16(); ushort valueCount = reader.ReadUInt16(); var values = new ValueRecord[valueCount]; for (int n = 0; n < valueCount; ++n) { values[n] = ValueRecord.CreateFrom(reader, valueFormat); } var subTable = new LkSubTableType1(values); //------- subTable.CoverageTable = CoverageTable.CreateFrom(reader, subTableStartAt + coverage); //------- this.subTables.Add(subTable); } break; } } }
public override void ReadValue(ValueRecord rec, int index, long value) { }