Example #1
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());
        }
Example #2
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());
        }
Example #3
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());
        }
Example #4
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());
        }