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

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

private TrueTypeFontUnicode ( string ttFile, string enc, bool emb, byte ttfAfm, bool forceRead ) : System
ttFile string
enc string
emb bool
ttfAfm byte
forceRead bool
Результат System
        internal TrueTypeFontUnicode(string ttFile, string enc, bool emb, byte[] ttfAfm, bool forceRead) {
            string nameBase = GetBaseName(ttFile);
            string ttcName = GetTTCName(nameBase);
            if (nameBase.Length < ttFile.Length) {
                style = ttFile.Substring(nameBase.Length);
            }
            encoding = enc;
            embedded = emb;
            fileName = ttcName;
            ttcIndex = "";
            if (ttcName.Length < nameBase.Length)
                ttcIndex = nameBase.Substring(ttcName.Length + 1);
            FontType = FONT_TYPE_TTUNI;
            if ((fileName.ToLower(System.Globalization.CultureInfo.InvariantCulture).EndsWith(".ttf") || fileName.ToLower(System.Globalization.CultureInfo.InvariantCulture).EndsWith(".otf") || fileName.ToLower(System.Globalization.CultureInfo.InvariantCulture).EndsWith(".ttc")) && ((enc.Equals(IDENTITY_H) || enc.Equals(IDENTITY_V)) && emb)) {
                Process(ttfAfm, forceRead);
                if (os_2.fsType == 2)
                    throw new DocumentException(fileName + style + " cannot be embedded due to licensing restrictions.");
                // Sivan
                if ((cmap31 == null && !fontSpecific) || (cmap10 == null && fontSpecific))
                    directTextToByte=true;
                    //throw new DocumentException(fileName + " " + style + " does not contain an usable cmap.");
                if (fontSpecific) {
                    fontSpecific = false;
                    String tempEncoding = encoding;
                    encoding = "";
                    CreateEncoding();
                    encoding = tempEncoding;
                    fontSpecific = true;
                }
            }
            else
                throw new DocumentException(fileName + " " + style + " is not a TTF font file.");
            vertical = enc.EndsWith("V");
        }