예제 #1
0
        public virtual void TrueTypeFontProgramIdentityHAllowEmbeddingEncodingPreferNotEmbeddedTest()
        {
            TrueTypeFont fontProgram = new PdfFontFactoryTest.CustomTrueTypeFontProgram(true);
            PdfType0Font font        = (PdfType0Font)PdfFontFactory.CreateFont(fontProgram, PdfEncodings.IDENTITY_H, PdfFontFactory.EmbeddingStrategy
                                                                               .PREFER_NOT_EMBEDDED);

            NUnit.Framework.Assert.IsNotNull(font);
            NUnit.Framework.Assert.IsTrue(font.IsEmbedded());
        }
예제 #2
0
        public virtual void DeprecatedEmbeddedFlagFalseWorksAsPreferNotEmbeddedTest()
        {
            // simply checks that embedded = false works as prefer not embedded
            // this test can be safely removed with clean up of deprecated methods in PdfFontFactory
            TrueTypeFont fontProgram = new PdfFontFactoryTest.CustomTrueTypeFontProgram(true);
            PdfType0Font font        = (PdfType0Font)PdfFontFactory.CreateFont(fontProgram, PdfEncodings.IDENTITY_H, false);

            NUnit.Framework.Assert.IsNotNull(font);
            NUnit.Framework.Assert.IsTrue(font.IsEmbedded());
        }