Public Sub Read(ByVal stream As System.IO.Stream) stream.Seek(0, System.IO.SeekOrigin.Begin) ttcTag = New Byte(4 - 1) {} If stream.Read(ttcTag, 0, 4) <> 4 Then Throw New System.IO.InvalidDataException() End If If Not (IsTTC) Then offsetTables = New Offset32(1 - 1) {} offsetTables(0) = New Offset32() Else majorVersion = stream.ReadUInt16BE() minorVersion = stream.ReadUInt16BE() numFonts = stream.ReadUInt32BE() offsetTables = New Offset32(numFonts - 1) {} With Nothing Dim i As Integer = 0 For _F_2 As Integer = 0 To 1 Step 0 If Not (i < numFonts) Then Exit For End If offsetTables(i) = New Offset32() offsetTables(i).offset = stream.ReadUInt32BE() i += 1 Next End With If majorVersion >= 2 Then dsigTag = stream.ReadUInt32BE() dsigLength = stream.ReadUInt32BE() dsigOffset = stream.ReadUInt32BE() If dsigTag <> &H44534947 Then ★ Throw New System.IO.InvalidDataException() End If End If End If End Sub