Esempio n. 1
0
        public virtual void AddGlyphTest()
        {
            Type3Font font = new Type3Font(false);

            font.AddGlyph(1, 1, 600, null, null);
            NUnit.Framework.Assert.AreEqual(1, font.GetNumberOfGlyphs());
        }
Esempio n. 2
0
        public virtual void ReplaceGlyphWithSameCodeTest()
        {
            Type3Font font = new Type3Font(false);

            font.AddGlyph(1, -1, 600, null, null);
            font.AddGlyph(1, -1, 700, null, null);
            NUnit.Framework.Assert.AreEqual(1, font.GetNumberOfGlyphs());
            NUnit.Framework.Assert.AreEqual(700, font.GetGlyphByCode(1).GetWidth());
        }
Esempio n. 3
0
        public virtual void ReplaceGlyphsWithSameUnicodeTest()
        {
            Type3Font font = new Type3Font(false);

            font.AddGlyph(1, 1, 600, null, null);
            font.AddGlyph(2, 1, 600, null, null);
            NUnit.Framework.Assert.AreEqual(1, font.GetNumberOfGlyphs());
            NUnit.Framework.Assert.AreEqual(2, font.GetGlyph(1).GetCode());
        }
Esempio n. 4
0
        public virtual void AddGlyphsWithDifferentCodesTest()
        {
            Type3Font font = new Type3Font(false);

            font.AddGlyph(1, -1, 600, null, null);
            font.AddGlyph(2, -1, 700, null, null);
            NUnit.Framework.Assert.AreEqual(2, font.GetNumberOfGlyphs());
            NUnit.Framework.Assert.AreEqual(600, font.GetGlyphByCode(1).GetWidth());
            NUnit.Framework.Assert.AreEqual(700, font.GetGlyphByCode(2).GetWidth());
        }
Esempio n. 5
0
        public virtual void AddGlyphsWithDifferentUnicodeTest()
        {
            Type3Font font = new Type3Font(false);

            font.AddGlyph(1, 1, 600, null, null);
            font.AddGlyph(2, 2, 600, null, null);
            NUnit.Framework.Assert.AreEqual(2, font.GetNumberOfGlyphs());
            NUnit.Framework.Assert.AreEqual(1, font.GetGlyphByCode(1).GetUnicode());
            NUnit.Framework.Assert.AreEqual(2, font.GetGlyphByCode(2).GetUnicode());
        }
Esempio n. 6
0
        public virtual void NotAddGlyphWithSameCodeEmptyUnicodeFirstTest()
        {
            Type3Font font = new Type3Font(false);

            font.AddGlyph(1, -1, 600, null, null);
            font.AddGlyph(1, 100, 600, null, null);
            NUnit.Framework.Assert.AreEqual(1, font.GetNumberOfGlyphs());
            NUnit.Framework.Assert.AreEqual(1, font.GetGlyph(100).GetCode());
            NUnit.Framework.Assert.AreEqual(100, font.GetGlyphByCode(1).GetUnicode());
        }