iTextSharp.text.pdf.TrueTypeFont.GetNames C# (CSharp) Метод

GetNames() приватный Метод

private GetNames ( int id ) : string[][]
id int
Результат string[][]
        internal string[][] GetNames(int id)
        {
            int[] table_location;
            tables.TryGetValue("name", out table_location);
            if (table_location == null)
                throw new DocumentException(MessageLocalization.GetComposedMessage("table.1.does.not.exist.in.2", "name", fileName + style));
            rf.Seek(table_location[0] + 2);
            int numRecords = rf.ReadUnsignedShort();
            int startOfStorage = rf.ReadUnsignedShort();
            List<string[]> names = new List<string[]>();
            for (int k = 0; k < numRecords; ++k) {
                int platformID = rf.ReadUnsignedShort();
                int platformEncodingID = rf.ReadUnsignedShort();
                int languageID = rf.ReadUnsignedShort();
                int nameID = rf.ReadUnsignedShort();
                int length = rf.ReadUnsignedShort();
                int offset = rf.ReadUnsignedShort();
                if (nameID == id) {
                    int pos = (int)rf.FilePointer;
                    rf.Seek(table_location[0] + startOfStorage + offset);
                    string name;
                    if (platformID == 0 || platformID == 3 || (platformID == 2 && platformEncodingID == 1)){
                        name = ReadUnicodeString(length);
                    }
                    else {
                        name = ReadStandardString(length);
                    }
                    names.Add(new string[]{platformID.ToString(),
                                              platformEncodingID.ToString(), languageID.ToString(), name});
                    rf.Seek(pos);
                }
            }
            string[][] thisName = new string[names.Count][];
            for (int k = 0; k < names.Count; ++k)
                thisName[k] = names[k];
            return thisName;
        }