Beispiel #1
0
 internal PdfType1Font(PdfDictionary fontDictionary)
     : base(fontDictionary)
 {
     newFont = false;
     // if there is no FontDescriptor, it is most likely one of the Standard Font with StandardEncoding as base encoding.
     // unused variable.
     // boolean fillStandardEncoding = !fontDictionary.containsKey(PdfName.FontDescriptor);
     fontEncoding = DocFontEncoding.CreateDocFontEncoding(fontDictionary.Get(PdfName.Encoding), toUnicode);
     fontProgram  = DocType1Font.CreateFontProgram(fontDictionary, fontEncoding, toUnicode);
     if (fontProgram is IDocFontProgram)
     {
         embedded = ((IDocFontProgram)fontProgram).GetFontFile() != null;
     }
     subset = false;
 }
Beispiel #2
0
        internal PdfType1Font(PdfDictionary fontDictionary)
            : base(fontDictionary)
        {
            newFont = false;
            CheckFontDictionary(fontDictionary, PdfName.Type1);
            CMapToUnicode toUni = FontUtil.ProcessToUnicode(fontDictionary.Get(PdfName.ToUnicode));

            fontEncoding = DocFontEncoding.CreateDocFontEncoding(fontDictionary.Get(PdfName.Encoding), toUni);
            fontProgram  = DocType1Font.CreateFontProgram(fontDictionary, fontEncoding, toUni);
            if (fontProgram is IDocFontProgram)
            {
                embedded = ((IDocFontProgram)fontProgram).GetFontFile() != null;
            }
            subset = false;
        }
Beispiel #3
0
        internal PdfType1Font(PdfDictionary fontDictionary)
            : base(fontDictionary)
        {
            newFont = false;
            CheckFontDictionary(fontDictionary, PdfName.Type1);
            CMapToUnicode toUni = FontUtil.ProcessToUnicode(fontDictionary.Get(PdfName.ToUnicode));
            //if there is no FontDescriptor, it is most likely one of the Standard Font with StandardEncoding as base encoding.
            bool fillStandardEncoding = !fontDictionary.ContainsKey(PdfName.FontDescriptor);

            fontEncoding = DocFontEncoding.CreateDocFontEncoding(fontDictionary.Get(PdfName.Encoding), toUni, fillStandardEncoding
                                                                 );
            fontProgram = DocType1Font.CreateFontProgram(fontDictionary, fontEncoding, toUni);
            if (fontProgram is IDocFontProgram)
            {
                embedded = ((IDocFontProgram)fontProgram).GetFontFile() != null;
            }
            subset = false;
        }