Esempio n. 1
0
        public virtual void GlyphWithUnicodeBiggerThan32CannotBeEncodedTest()
        {
            PdfDictionary dictionary = new PdfDictionary();

            dictionary.Put(PdfName.FontMatrix, new PdfArray());
            PdfDictionary charProcs = new PdfDictionary();

            dictionary.Put(PdfName.CharProcs, charProcs);
            dictionary.Put(PdfName.Widths, new PdfArray());
            PdfType3Font type3Font = new PdfType3Font(dictionary);
            int          cannotEncodeAndAUnicodeBiggerThan32TestValue = 333;

            NUnit.Framework.Assert.IsNull(type3Font.GetGlyph(cannotEncodeAndAUnicodeBiggerThan32TestValue));
        }
Esempio n. 2
0
        public virtual void SetPdfFontFlagsTest()
        {
            PdfDictionary dictionary = new PdfDictionary();

            dictionary.Put(PdfName.FontMatrix, new PdfArray());
            PdfDictionary charProcs = new PdfDictionary();

            dictionary.Put(PdfName.CharProcs, charProcs);
            dictionary.Put(PdfName.Widths, new PdfArray());
            PdfType3Font type3Font = new PdfType3Font(dictionary);
            int          randomTestFontFlagsValue = 5;

            type3Font.SetPdfFontFlags(randomTestFontFlagsValue);
            NUnit.Framework.Assert.IsNotNull(type3Font.fontProgram);
            NUnit.Framework.Assert.AreEqual(randomTestFontFlagsValue, type3Font.fontProgram.GetPdfFontFlags());
        }
Esempio n. 3
0
        public virtual void SetFontStretchTest()
        {
            PdfDictionary dictionary = new PdfDictionary();

            dictionary.Put(PdfName.FontMatrix, new PdfArray());
            PdfDictionary charProcs = new PdfDictionary();

            dictionary.Put(PdfName.CharProcs, charProcs);
            dictionary.Put(PdfName.Widths, new PdfArray());
            PdfType3Font type3Font   = new PdfType3Font(dictionary);
            String       fontStretch = "test";

            type3Font.SetFontStretch(fontStretch);
            NUnit.Framework.Assert.IsNotNull(type3Font.fontProgram);
            NUnit.Framework.Assert.IsNotNull(type3Font.fontProgram.GetFontNames());
            NUnit.Framework.Assert.AreEqual(fontStretch, type3Font.fontProgram.GetFontNames().GetFontStretch());
        }