Exemple #1
0
 def test_cleanup(self):
     kerning = {
         ("A", "A"): 0,
         ("B", "B"): 1,
         ("C", "public.kern2.C"): 0,
         ("public.kern1.C", "public.kern2.C"): 1,
         ("D", "D"): 1.0,
         ("E", "E"): 1.2,
     }
     groups = {"public.kern1.C": ["C", "C1"], "public.kern2.C": ["C", "C1"]}
     obj = MathKerning(kerning, groups)
     obj.cleanup()
     self.assertEqual(sorted(obj.items()),
                      [(('B', 'B'), 1), (('C', 'public.kern2.C'), 0),
                       (('D', 'D'), 1), (('E', 'E'), 1.2),
                       (('public.kern1.C', 'public.kern2.C'), 1)])
Exemple #2
0
 def test_cleanup(self):
     kerning = {
         ("A", "A"): 0,
         ("B", "B"): 1,
         ("C", "public.kern2.C"): 0,
         ("public.kern1.C", "public.kern2.C"): 1,
         ("D", "D"): 1.0,
         ("E", "E"): 1.2,
     }
     groups = {
         "public.kern1.C": ["C", "C1"],
         "public.kern2.C": ["C", "C1"]
     }
     obj = MathKerning(kerning, groups)
     obj.cleanup()
     self.assertEqual(
         sorted(obj.items()),
         [(('B', 'B'), 1),
          (('C', 'public.kern2.C'), 0),
          (('D', 'D'), 1),
          (('E', 'E'), 1.2),
          (('public.kern1.C', 'public.kern2.C'), 1)])