diff --git a/gramps/src/FontScale.py b/gramps/src/FontScale.py index b6de44cdd..26ef86234 100644 --- a/gramps/src/FontScale.py +++ b/gramps/src/FontScale.py @@ -18,228 +18,228 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # _swiss = [ -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.278, 0.278, 0.355, 0.556, 0.556, 0.889, 0.667, 0.191, -0.333, 0.333, 0.389, 0.584, 0.278, 0.333, 0.278, 0.278, 0.556, 0.556, -0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.278, 0.278, -0.584, 0.584, 0.584, 0.556, 1.015, 0.667, 0.667, 0.722, 0.722, 0.667, -0.611, 0.778, 0.722, 0.278, 0.500, 0.667, 0.556, 0.833, 0.722, 0.778, -0.667, 0.778, 0.722, 0.667, 0.611, 0.722, 0.667, 0.944, 0.667, 0.667, -0.611, 0.278, 0.278, 0.278, 0.469, 0.556, 0.333, 0.556, 0.556, 0.500, -0.556, 0.556, 0.278, 0.556, 0.556, 0.222, 0.222, 0.500, 0.222, 0.833, -0.556, 0.556, 0.556, 0.556, 0.333, 0.500, 0.278, 0.556, 0.500, 0.722, -0.500, 0.500, 0.500, 0.334, 0.260, 0.334, 0.584, 0.350, 0.556, 0.350, -0.222, 0.556, 0.333, 1.000, 0.556, 0.556, 0.333, 1.000, 0.667, 0.333, -1.000, 0.350, 0.611, 0.350, 0.350, 0.222, 0.222, 0.333, 0.333, 0.350, -0.556, 1.000, 0.333, 1.000, 0.500, 0.333, 0.944, 0.350, 0.500, 0.667, -0.278, 0.333, 0.556, 0.556, 0.556, 0.556, 0.260, 0.556, 0.333, 0.737, -0.370, 0.556, 0.584, 0.333, 0.737, 0.333, 0.400, 0.584, 0.333, 0.333, -0.333, 0.556, 0.537, 0.278, 0.333, 0.333, 0.365, 0.556, 0.834, 0.834, -0.834, 0.611, 0.667, 0.667, 0.667, 0.667, 0.667, 0.667, 1.000, 0.722, -0.667, 0.667, 0.667, 0.667, 0.278, 0.278, 0.278, 0.278, 0.722, 0.722, -0.778, 0.778, 0.778, 0.778, 0.778, 0.584, 0.778, 0.722, 0.722, 0.722, -0.722, 0.667, 0.667, 0.611, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, -0.889, 0.500, 0.556, 0.556, 0.556, 0.556, 0.278, 0.278, 0.278, 0.278, -0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.584, 0.611, 0.556, -0.556, 0.556, 0.556, 0.500, 0.556, 0.500] + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 278, 278, 355, 556, 556, 889, 667, 191, + 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, + 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, + 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, + 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, + 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, + 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, + 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, + 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, + 500, 500, 500, 334, 260, 334, 584, 350, 556, 350, + 222, 556, 333, 1000, 556, 556, 333, 1000, 667, 333, +1000, 350, 611, 350, 350, 222, 222, 333, 333, 350, + 556, 1000, 333, 1000, 500, 333, 944, 350, 500, 667, + 278, 333, 556, 556, 556, 556, 260, 556, 333, 737, + 370, 556, 584, 333, 737, 333, 400, 584, 333, 333, + 333, 556, 537, 278, 333, 333, 365, 556, 834, 834, + 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, + 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, + 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, + 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, + 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, + 556, 556, 556, 556, 556, 556, 556, 584, 611, 556, + 556, 556, 556, 500, 556, 500] _swiss_b = [ -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.278, 0.333, 0.474, 0.556, 0.556, 0.889, 0.722, 0.238, -0.333, 0.333, 0.389, 0.584, 0.278, 0.333, 0.278, 0.278, 0.556, 0.556, -0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.333, 0.333, -0.584, 0.584, 0.584, 0.611, 0.975, 0.722, 0.722, 0.722, 0.722, 0.667, -0.611, 0.778, 0.722, 0.278, 0.556, 0.722, 0.611, 0.833, 0.722, 0.778, -0.667, 0.778, 0.722, 0.667, 0.611, 0.722, 0.667, 0.944, 0.667, 0.667, -0.611, 0.333, 0.278, 0.333, 0.584, 0.556, 0.333, 0.556, 0.611, 0.556, -0.611, 0.556, 0.333, 0.611, 0.611, 0.278, 0.278, 0.556, 0.278, 0.889, -0.611, 0.611, 0.611, 0.611, 0.389, 0.556, 0.333, 0.611, 0.556, 0.778, -0.556, 0.556, 0.500, 0.389, 0.280, 0.389, 0.584, 0.350, 0.556, 0.350, -0.278, 0.556, 0.500, 1.000, 0.556, 0.556, 0.333, 1.000, 0.667, 0.333, -1.000, 0.350, 0.611, 0.350, 0.350, 0.278, 0.278, 0.500, 0.500, 0.350, -0.556, 1.000, 0.333, 1.000, 0.556, 0.333, 0.944, 0.350, 0.500, 0.667, -0.278, 0.333, 0.556, 0.556, 0.556, 0.556, 0.280, 0.556, 0.333, 0.737, -0.370, 0.556, 0.584, 0.333, 0.737, 0.333, 0.400, 0.584, 0.333, 0.333, -0.333, 0.611, 0.556, 0.278, 0.333, 0.333, 0.365, 0.556, 0.834, 0.834, -0.834, 0.611, 0.722, 0.722, 0.722, 0.722, 0.722, 0.722, 1.000, 0.722, -0.667, 0.667, 0.667, 0.667, 0.278, 0.278, 0.278, 0.278, 0.722, 0.722, -0.778, 0.778, 0.778, 0.778, 0.778, 0.584, 0.778, 0.722, 0.722, 0.722, -0.722, 0.667, 0.667, 0.611, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, -0.889, 0.556, 0.556, 0.556, 0.556, 0.556, 0.278, 0.278, 0.278, 0.278, -0.611, 0.611, 0.611, 0.611, 0.611, 0.611, 0.611, 0.584, 0.611, 0.611, -0.611, 0.611, 0.611, 0.556, 0.611, 0.556] + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 278, 333, 474, 556, 556, 889, 722, 238, + 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, + 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, + 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, + 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, + 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, + 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, + 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, + 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, + 556, 556, 500, 389, 280, 389, 584, 350, 556, 350, + 278, 556, 500, 1000, 556, 556, 333, 1000, 667, 333, +1000, 350, 611, 350, 350, 278, 278, 500, 500, 350, + 556, 1000, 333, 1000, 556, 333, 944, 350, 500, 667, + 278, 333, 556, 556, 556, 556, 280, 556, 333, 737, + 370, 556, 584, 333, 737, 333, 400, 584, 333, 333, + 333, 611, 556, 278, 333, 333, 365, 556, 834, 834, + 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, + 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, + 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, + 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, + 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, + 611, 611, 611, 611, 611, 611, 611, 584, 611, 611, + 611, 611, 611, 556, 611, 556] _swiss_i = [ -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.278, 0.278, 0.355, 0.556, 0.556, 0.889, 0.667, 0.191, -0.333, 0.333, 0.389, 0.584, 0.278, 0.333, 0.278, 0.278, 0.556, 0.556, -0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.278, 0.278, -0.584, 0.584, 0.584, 0.556, 1.015, 0.667, 0.667, 0.722, 0.722, 0.667, -0.611, 0.778, 0.722, 0.278, 0.500, 0.667, 0.556, 0.833, 0.722, 0.778, -0.667, 0.778, 0.722, 0.667, 0.611, 0.722, 0.667, 0.944, 0.667, 0.667, -0.611, 0.278, 0.278, 0.278, 0.469, 0.556, 0.333, 0.556, 0.556, 0.500, -0.556, 0.556, 0.278, 0.556, 0.556, 0.222, 0.222, 0.500, 0.222, 0.833, -0.556, 0.556, 0.556, 0.556, 0.333, 0.500, 0.278, 0.556, 0.500, 0.722, -0.500, 0.500, 0.500, 0.334, 0.260, 0.334, 0.584, 0.350, 0.556, 0.350, -0.222, 0.556, 0.333, 1.000, 0.556, 0.556, 0.333, 1.000, 0.667, 0.333, -1.000, 0.350, 0.611, 0.350, 0.350, 0.222, 0.222, 0.333, 0.333, 0.350, -0.556, 1.000, 0.333, 1.000, 0.500, 0.333, 0.944, 0.350, 0.500, 0.667, -0.278, 0.333, 0.556, 0.556, 0.556, 0.556, 0.260, 0.556, 0.333, 0.737, -0.370, 0.556, 0.584, 0.333, 0.737, 0.333, 0.400, 0.584, 0.333, 0.333, -0.333, 0.556, 0.537, 0.278, 0.333, 0.333, 0.365, 0.556, 0.834, 0.834, -0.834, 0.611, 0.667, 0.667, 0.667, 0.667, 0.667, 0.667, 1.000, 0.722, -0.667, 0.667, 0.667, 0.667, 0.278, 0.278, 0.278, 0.278, 0.722, 0.722, -0.778, 0.778, 0.778, 0.778, 0.778, 0.584, 0.778, 0.722, 0.722, 0.722, -0.722, 0.667, 0.667, 0.611, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, -0.889, 0.500, 0.556, 0.556, 0.556, 0.556, 0.278, 0.278, 0.278, 0.278, -0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.584, 0.611, 0.556, -0.556, 0.556, 0.556, 0.500, 0.556, 0.500] + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 278, 278, 355, 556, 556, 889, 667, 191, + 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, + 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, + 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, + 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, + 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, + 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, + 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, + 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, + 500, 500, 500, 334, 260, 334, 584, 350, 556, 350, + 222, 556, 333, 1000, 556, 556, 333, 1000, 667, 333, +1000, 350, 611, 350, 350, 222, 222, 333, 333, 350, + 556, 1000, 333, 1000, 500, 333, 944, 350, 500, 667, + 278, 333, 556, 556, 556, 556, 260, 556, 333, 737, + 370, 556, 584, 333, 737, 333, 400, 584, 333, 333, + 333, 556, 537, 278, 333, 333, 365, 556, 834, 834, + 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, + 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, + 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, + 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, + 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, + 556, 556, 556, 556, 556, 556, 556, 584, 611, 556, + 556, 556, 556, 500, 556, 500] _swiss_bi = [ -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.278, 0.333, 0.474, 0.556, 0.556, 0.889, 0.722, 0.238, -0.333, 0.333, 0.389, 0.584, 0.278, 0.333, 0.278, 0.278, 0.556, 0.556, -0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, 0.333, 0.333, -0.584, 0.584, 0.584, 0.611, 0.975, 0.722, 0.722, 0.722, 0.722, 0.667, -0.611, 0.778, 0.722, 0.278, 0.556, 0.722, 0.611, 0.833, 0.722, 0.778, -0.667, 0.778, 0.722, 0.667, 0.611, 0.722, 0.667, 0.944, 0.667, 0.667, -0.611, 0.333, 0.278, 0.333, 0.584, 0.556, 0.333, 0.556, 0.611, 0.556, -0.611, 0.556, 0.333, 0.611, 0.611, 0.278, 0.278, 0.556, 0.278, 0.889, -0.611, 0.611, 0.611, 0.611, 0.389, 0.556, 0.333, 0.611, 0.556, 0.778, -0.556, 0.556, 0.500, 0.389, 0.280, 0.389, 0.584, 0.350, 0.556, 0.350, -0.278, 0.556, 0.500, 1.000, 0.556, 0.556, 0.333, 1.000, 0.667, 0.333, -1.000, 0.350, 0.611, 0.350, 0.350, 0.278, 0.278, 0.500, 0.500, 0.350, -0.556, 1.000, 0.333, 1.000, 0.556, 0.333, 0.944, 0.350, 0.500, 0.667, -0.278, 0.333, 0.556, 0.556, 0.556, 0.556, 0.280, 0.556, 0.333, 0.737, -0.370, 0.556, 0.584, 0.333, 0.737, 0.333, 0.400, 0.584, 0.333, 0.333, -0.333, 0.611, 0.556, 0.278, 0.333, 0.333, 0.365, 0.556, 0.834, 0.834, -0.834, 0.611, 0.722, 0.722, 0.722, 0.722, 0.722, 0.722, 1.000, 0.722, -0.667, 0.667, 0.667, 0.667, 0.278, 0.278, 0.278, 0.278, 0.722, 0.722, -0.778, 0.778, 0.778, 0.778, 0.778, 0.584, 0.778, 0.722, 0.722, 0.722, -0.722, 0.667, 0.667, 0.611, 0.556, 0.556, 0.556, 0.556, 0.556, 0.556, -0.889, 0.556, 0.556, 0.556, 0.556, 0.556, 0.278, 0.278, 0.278, 0.278, -0.611, 0.611, 0.611, 0.611, 0.611, 0.611, 0.611, 0.584, 0.611, 0.611, -0.611, 0.611, 0.611, 0.556, 0.611, 0.556] + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 278, 333, 474, 556, 556, 889, 722, 238, + 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, + 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, + 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, + 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, + 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, + 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, + 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, + 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, + 556, 556, 500, 389, 280, 389, 584, 350, 556, 350, + 278, 556, 500, 1000, 556, 556, 333, 1000, 667, 333, +1000, 350, 611, 350, 350, 278, 278, 500, 500, 350, + 556, 1000, 333, 1000, 556, 333, 944, 350, 500, 667, + 278, 333, 556, 556, 556, 556, 280, 556, 333, 737, + 370, 556, 584, 333, 737, 333, 400, 584, 333, 333, + 333, 611, 556, 278, 333, 333, 365, 556, 834, 834, + 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, + 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, + 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, + 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, + 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, + 611, 611, 611, 611, 611, 611, 611, 584, 611, 611, + 611, 611, 611, 556, 611, 556] _roman = [ -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.250, 0.333, 0.408, 0.500, 0.500, 0.833, 0.778, 0.180, -0.333, 0.333, 0.500, 0.564, 0.250, 0.333, 0.250, 0.278, 0.500, 0.500, -0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.278, 0.278, -0.564, 0.564, 0.564, 0.444, 0.921, 0.722, 0.667, 0.667, 0.722, 0.611, -0.556, 0.722, 0.722, 0.333, 0.389, 0.722, 0.611, 0.889, 0.722, 0.722, -0.556, 0.722, 0.667, 0.556, 0.611, 0.722, 0.722, 0.944, 0.722, 0.722, -0.611, 0.333, 0.278, 0.333, 0.469, 0.500, 0.333, 0.444, 0.500, 0.444, -0.500, 0.444, 0.333, 0.500, 0.500, 0.278, 0.278, 0.500, 0.278, 0.778, -0.500, 0.500, 0.500, 0.500, 0.333, 0.389, 0.278, 0.500, 0.500, 0.722, -0.500, 0.500, 0.444, 0.480, 0.200, 0.480, 0.541, 0.350, 0.500, 0.350, -0.333, 0.500, 0.444, 1.000, 0.500, 0.500, 0.333, 1.000, 0.556, 0.333, -0.889, 0.350, 0.611, 0.350, 0.350, 0.333, 0.333, 0.444, 0.444, 0.350, -0.500, 1.000, 0.333, 0.980, 0.389, 0.333, 0.722, 0.350, 0.444, 0.722, -0.250, 0.333, 0.500, 0.500, 0.500, 0.500, 0.200, 0.500, 0.333, 0.760, -0.276, 0.500, 0.564, 0.333, 0.760, 0.333, 0.400, 0.564, 0.300, 0.300, -0.333, 0.500, 0.453, 0.250, 0.333, 0.300, 0.310, 0.500, 0.750, 0.750, -0.750, 0.444, 0.722, 0.722, 0.722, 0.722, 0.722, 0.722, 0.889, 0.667, -0.611, 0.611, 0.611, 0.611, 0.333, 0.333, 0.333, 0.333, 0.722, 0.722, -0.722, 0.722, 0.722, 0.722, 0.722, 0.564, 0.722, 0.722, 0.722, 0.722, -0.722, 0.722, 0.556, 0.500, 0.444, 0.444, 0.444, 0.444, 0.444, 0.444, -0.667, 0.444, 0.444, 0.444, 0.444, 0.444, 0.278, 0.278, 0.278, 0.278, -0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.564, 0.500, 0.500, -0.500, 0.500, 0.500, 0.500, 0.500, 0.500] + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 250, 333, 408, 500, 500, 833, 778, 180, + 333, 333, 500, 564, 250, 333, 250, 278, 500, 500, + 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, + 564, 564, 564, 444, 921, 722, 667, 667, 722, 611, + 556, 722, 722, 333, 389, 722, 611, 889, 722, 722, + 556, 722, 667, 556, 611, 722, 722, 944, 722, 722, + 611, 333, 278, 333, 469, 500, 333, 444, 500, 444, + 500, 444, 333, 500, 500, 278, 278, 500, 278, 778, + 500, 500, 500, 500, 333, 389, 278, 500, 500, 722, + 500, 500, 444, 480, 200, 480, 541, 350, 500, 350, + 333, 500, 444, 1000, 500, 500, 333, 1000, 556, 333, + 889, 350, 611, 350, 350, 333, 333, 444, 444, 350, + 500, 1000, 333, 980, 389, 333, 722, 350, 444, 722, + 250, 333, 500, 500, 500, 500, 200, 500, 333, 760, + 276, 500, 564, 333, 760, 333, 400, 564, 300, 300, + 333, 500, 453, 250, 333, 300, 310, 500, 750, 750, + 750, 444, 722, 722, 722, 722, 722, 722, 889, 667, + 611, 611, 611, 611, 333, 333, 333, 333, 722, 722, + 722, 722, 722, 722, 722, 564, 722, 722, 722, 722, + 722, 722, 556, 500, 444, 444, 444, 444, 444, 444, + 667, 444, 444, 444, 444, 444, 278, 278, 278, 278, + 500, 500, 500, 500, 500, 500, 500, 564, 500, 500, + 500, 500, 500, 500, 500, 500] _roman_b = [ -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.250, 0.333, 0.555, 0.500, 0.500, 1.000, 0.833, 0.278, -0.333, 0.333, 0.500, 0.570, 0.250, 0.333, 0.250, 0.278, 0.500, 0.500, -0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.333, 0.333, -0.570, 0.570, 0.570, 0.500, 0.930, 0.722, 0.667, 0.722, 0.722, 0.667, -0.611, 0.778, 0.778, 0.389, 0.500, 0.778, 0.667, 0.944, 0.722, 0.778, -0.611, 0.778, 0.722, 0.556, 0.667, 0.722, 0.722, 1.000, 0.722, 0.722, -0.667, 0.333, 0.278, 0.333, 0.581, 0.500, 0.333, 0.500, 0.556, 0.444, -0.556, 0.444, 0.333, 0.500, 0.556, 0.278, 0.333, 0.556, 0.278, 0.833, -0.556, 0.500, 0.556, 0.556, 0.444, 0.389, 0.333, 0.556, 0.500, 0.722, -0.500, 0.500, 0.444, 0.394, 0.220, 0.394, 0.520, 0.350, 0.500, 0.350, -0.333, 0.500, 0.500, 1.000, 0.500, 0.500, 0.333, 1.000, 0.556, 0.333, -1.000, 0.350, 0.667, 0.350, 0.350, 0.333, 0.333, 0.500, 0.500, 0.350, -0.500, 1.000, 0.333, 1.000, 0.389, 0.333, 0.722, 0.350, 0.444, 0.722, -0.250, 0.333, 0.500, 0.500, 0.500, 0.500, 0.220, 0.500, 0.333, 0.747, -0.300, 0.500, 0.570, 0.333, 0.747, 0.333, 0.400, 0.570, 0.300, 0.300, -0.333, 0.556, 0.540, 0.250, 0.333, 0.300, 0.330, 0.500, 0.750, 0.750, -0.750, 0.500, 0.722, 0.722, 0.722, 0.722, 0.722, 0.722, 1.000, 0.722, -0.667, 0.667, 0.667, 0.667, 0.389, 0.389, 0.389, 0.389, 0.722, 0.722, -0.778, 0.778, 0.778, 0.778, 0.778, 0.570, 0.778, 0.722, 0.722, 0.722, -0.722, 0.722, 0.611, 0.556, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, -0.722, 0.444, 0.444, 0.444, 0.444, 0.444, 0.278, 0.278, 0.278, 0.278, -0.500, 0.556, 0.500, 0.500, 0.500, 0.500, 0.500, 0.570, 0.500, 0.556, -0.556, 0.556, 0.556, 0.500, 0.556, 0.500] + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 250, 333, 555, 500, 500, 1000, 833, 278, + 333, 333, 500, 570, 250, 333, 250, 278, 500, 500, + 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, + 570, 570, 570, 500, 930, 722, 667, 722, 722, 667, + 611, 778, 778, 389, 500, 778, 667, 944, 722, 778, + 611, 778, 722, 556, 667, 722, 722, 1000, 722, 722, + 667, 333, 278, 333, 581, 500, 333, 500, 556, 444, + 556, 444, 333, 500, 556, 278, 333, 556, 278, 833, + 556, 500, 556, 556, 444, 389, 333, 556, 500, 722, + 500, 500, 444, 394, 220, 394, 520, 350, 500, 350, + 333, 500, 500, 1000, 500, 500, 333, 1000, 556, 333, +1000, 350, 667, 350, 350, 333, 333, 500, 500, 350, + 500, 1000, 333, 1000, 389, 333, 722, 350, 444, 722, + 250, 333, 500, 500, 500, 500, 220, 500, 333, 747, + 300, 500, 570, 333, 747, 333, 400, 570, 300, 300, + 333, 556, 540, 250, 333, 300, 330, 500, 750, 750, + 750, 500, 722, 722, 722, 722, 722, 722, 1000, 722, + 667, 667, 667, 667, 389, 389, 389, 389, 722, 722, + 778, 778, 778, 778, 778, 570, 778, 722, 722, 722, + 722, 722, 611, 556, 500, 500, 500, 500, 500, 500, + 722, 444, 444, 444, 444, 444, 278, 278, 278, 278, + 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, + 556, 556, 556, 500, 556, 500] _roman_i = [ -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.250, 0.333, 0.420, 0.500, 0.500, 0.833, 0.778, 0.214, -0.333, 0.333, 0.500, 0.675, 0.250, 0.333, 0.250, 0.278, 0.500, 0.500, -0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.333, 0.333, -0.675, 0.675, 0.675, 0.500, 0.920, 0.611, 0.611, 0.667, 0.722, 0.611, -0.611, 0.722, 0.722, 0.333, 0.444, 0.667, 0.556, 0.833, 0.667, 0.722, -0.611, 0.722, 0.611, 0.500, 0.556, 0.722, 0.611, 0.833, 0.611, 0.556, -0.556, 0.389, 0.278, 0.389, 0.422, 0.500, 0.333, 0.500, 0.500, 0.444, -0.500, 0.444, 0.278, 0.500, 0.500, 0.278, 0.278, 0.444, 0.278, 0.722, -0.500, 0.500, 0.500, 0.500, 0.389, 0.389, 0.278, 0.500, 0.444, 0.667, -0.444, 0.444, 0.389, 0.400, 0.275, 0.400, 0.541, 0.350, 0.500, 0.350, -0.333, 0.500, 0.556, 0.889, 0.500, 0.500, 0.333, 1.000, 0.500, 0.333, -0.944, 0.350, 0.556, 0.350, 0.350, 0.333, 0.333, 0.556, 0.556, 0.350, -0.500, 0.889, 0.333, 0.980, 0.389, 0.333, 0.667, 0.350, 0.389, 0.556, -0.250, 0.389, 0.500, 0.500, 0.500, 0.500, 0.275, 0.500, 0.333, 0.760, -0.276, 0.500, 0.675, 0.333, 0.760, 0.333, 0.400, 0.675, 0.300, 0.300, -0.333, 0.500, 0.523, 0.250, 0.333, 0.300, 0.310, 0.500, 0.750, 0.750, -0.750, 0.500, 0.611, 0.611, 0.611, 0.611, 0.611, 0.611, 0.889, 0.667, -0.611, 0.611, 0.611, 0.611, 0.333, 0.333, 0.333, 0.333, 0.722, 0.667, -0.722, 0.722, 0.722, 0.722, 0.722, 0.675, 0.722, 0.722, 0.722, 0.722, -0.722, 0.556, 0.611, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, -0.667, 0.444, 0.444, 0.444, 0.444, 0.444, 0.278, 0.278, 0.278, 0.278, -0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.675, 0.500, 0.500, -0.500, 0.500, 0.500, 0.444, 0.500, 0.444] + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 250, 333, 420, 500, 500, 833, 778, 214, + 333, 333, 500, 675, 250, 333, 250, 278, 500, 500, + 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, + 675, 675, 675, 500, 920, 611, 611, 667, 722, 611, + 611, 722, 722, 333, 444, 667, 556, 833, 667, 722, + 611, 722, 611, 500, 556, 722, 611, 833, 611, 556, + 556, 389, 278, 389, 422, 500, 333, 500, 500, 444, + 500, 444, 278, 500, 500, 278, 278, 444, 278, 722, + 500, 500, 500, 500, 389, 389, 278, 500, 444, 667, + 444, 444, 389, 400, 275, 400, 541, 350, 500, 350, + 333, 500, 556, 889, 500, 500, 333, 1000, 500, 333, + 944, 350, 556, 350, 350, 333, 333, 556, 556, 350, + 500, 889, 333, 980, 389, 333, 667, 350, 389, 556, + 250, 389, 500, 500, 500, 500, 275, 500, 333, 760, + 276, 500, 675, 333, 760, 333, 400, 675, 300, 300, + 333, 500, 523, 250, 333, 300, 310, 500, 750, 750, + 750, 500, 611, 611, 611, 611, 611, 611, 889, 667, + 611, 611, 611, 611, 333, 333, 333, 333, 722, 667, + 722, 722, 722, 722, 722, 675, 722, 722, 722, 722, + 722, 556, 611, 500, 500, 500, 500, 500, 500, 500, + 667, 444, 444, 444, 444, 444, 278, 278, 278, 278, + 500, 500, 500, 500, 500, 500, 500, 675, 500, 500, + 500, 500, 500, 444, 500, 444] _roman_bi = [ -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, -0.000, 0.000, 0.250, 0.389, 0.555, 0.500, 0.500, 0.833, 0.778, 0.278, -0.333, 0.333, 0.500, 0.570, 0.250, 0.333, 0.250, 0.278, 0.500, 0.500, -0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.333, 0.333, -0.570, 0.570, 0.570, 0.500, 0.832, 0.667, 0.667, 0.667, 0.722, 0.667, -0.667, 0.722, 0.778, 0.389, 0.500, 0.667, 0.611, 0.889, 0.722, 0.722, -0.611, 0.722, 0.667, 0.556, 0.611, 0.722, 0.667, 0.889, 0.667, 0.611, -0.611, 0.333, 0.278, 0.333, 0.570, 0.500, 0.333, 0.500, 0.500, 0.444, -0.500, 0.444, 0.333, 0.500, 0.556, 0.278, 0.278, 0.500, 0.278, 0.778, -0.556, 0.500, 0.500, 0.500, 0.389, 0.389, 0.278, 0.556, 0.444, 0.667, -0.500, 0.444, 0.389, 0.348, 0.220, 0.348, 0.570, 0.350, 0.500, 0.350, -0.333, 0.500, 0.500, 1.000, 0.500, 0.500, 0.333, 1.000, 0.556, 0.333, -0.944, 0.350, 0.611, 0.350, 0.350, 0.333, 0.333, 0.500, 0.500, 0.350, -0.500, 1.000, 0.333, 1.000, 0.389, 0.333, 0.722, 0.350, 0.389, 0.611, -0.250, 0.389, 0.500, 0.500, 0.500, 0.500, 0.220, 0.500, 0.333, 0.747, -0.266, 0.500, 0.606, 0.333, 0.747, 0.333, 0.400, 0.570, 0.300, 0.300, -0.333, 0.576, 0.500, 0.250, 0.333, 0.300, 0.300, 0.500, 0.750, 0.750, -0.750, 0.500, 0.667, 0.667, 0.667, 0.667, 0.667, 0.667, 0.944, 0.667, -0.667, 0.667, 0.667, 0.667, 0.389, 0.389, 0.389, 0.389, 0.722, 0.722, -0.722, 0.722, 0.722, 0.722, 0.722, 0.570, 0.722, 0.722, 0.722, 0.722, -0.722, 0.611, 0.611, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, -0.722, 0.444, 0.444, 0.444, 0.444, 0.444, 0.278, 0.278, 0.278, 0.278, -0.500, 0.556, 0.500, 0.500, 0.500, 0.500, 0.500, 0.570, 0.500, 0.556, -0.556, 0.556, 0.556, 0.444, 0.500, 0.444] + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 250, 389, 555, 500, 500, 833, 778, 278, + 333, 333, 500, 570, 250, 333, 250, 278, 500, 500, + 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, + 570, 570, 570, 500, 832, 667, 667, 667, 722, 667, + 667, 722, 778, 389, 500, 667, 611, 889, 722, 722, + 611, 722, 667, 556, 611, 722, 667, 889, 667, 611, + 611, 333, 278, 333, 570, 500, 333, 500, 500, 444, + 500, 444, 333, 500, 556, 278, 278, 500, 278, 778, + 556, 500, 500, 500, 389, 389, 278, 556, 444, 667, + 500, 444, 389, 348, 220, 348, 570, 350, 500, 350, + 333, 500, 500, 1000, 500, 500, 333, 1000, 556, 333, + 944, 350, 611, 350, 350, 333, 333, 500, 500, 350, + 500, 1000, 333, 1000, 389, 333, 722, 350, 389, 611, + 250, 389, 500, 500, 500, 500, 220, 500, 333, 747, + 266, 500, 606, 333, 747, 333, 400, 570, 300, 300, + 333, 576, 500, 250, 333, 300, 300, 500, 750, 750, + 750, 500, 667, 667, 667, 667, 667, 667, 944, 667, + 667, 667, 667, 667, 389, 389, 389, 389, 722, 722, + 722, 722, 722, 722, 722, 570, 722, 722, 722, 722, + 722, 611, 611, 500, 500, 500, 500, 500, 500, 500, + 722, 444, 444, 444, 444, 444, 278, 278, 278, 278, + 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, + 556, 556, 556, 444, 500, 444] _font_array = [ [_swiss, _swiss_b, _swiss_i, _swiss_bi ], [_roman, _roman_b, _roman_i, _roman_bi ] ] @@ -253,8 +253,10 @@ def string_width(font,text): i = font.get_type_face() j = font.get_bold() + font.get_italic()*2 s = font.get_size() + scale = 1000.0 l = _font_array[i][j] r = 0 for c in text: - r = r + l[ord(c)] + r = r + (l[ord(c)]/scale) return (r+1)*s + diff --git a/gramps/src/OpenDrawDoc.py b/gramps/src/OpenDrawDoc.py index a9a6fb6e0..7d89bceb4 100644 --- a/gramps/src/OpenDrawDoc.py +++ b/gramps/src/OpenDrawDoc.py @@ -27,6 +27,7 @@ from DrawDoc import * from latin_utf8 import latin_to_utf8 import const +from utils import fl2txt try: from codecs import * @@ -257,7 +258,7 @@ class OpenDrawDoc(DrawDoc): self.f.write('\n') @@ -298,17 +299,17 @@ class OpenDrawDoc(DrawDoc): self.f.write('\n') self.f.write('\n') self.f.write('\n') - self.f.write('\n' % self.rmargin) + self.f.write('fo:margin-top="%scm" ' % fl2txt("%.2f",self.tmargin)) + self.f.write('fo:margin-bottom="%scm" ' % fl2txt("%.2f",self.bmargin)) + self.f.write('fo:margin-left="%scm" ' % fl2txt("%.2f",self.lmargin)) + self.f.write('fo:margin-right="%scm"/>\n' % fl2txt("%.2f",self.rmargin)) self.f.write('\n') self.f.write('\n') self.f.write('\n') @@ -415,23 +416,22 @@ class OpenDrawDoc(DrawDoc): def draw_line(self,style,x1,y1,x2,y2): self.f.write('\n' % y2) + self.f.write('" svg:x1="%scm" ' % fl2txt("%.3f",x1)) + self.f.write('svg:y1="%scm" ' % fl2txt("%.3f",y1)) + self.f.write('svg:x2="%scm" ' % fl2txt("%.3f",x2)) + self.f.write('svg:y2="%scm"/>\n' % fl2txt("%.3f",y2)) def draw_box(self,style,text,x,y): box_style = self.draw_styles[style] para_name = box_style.get_paragraph_style() self.f.write('') text = latin_to_utf8(string.replace(text,'\n','')) diff --git a/gramps/src/gramps.py b/gramps/src/gramps.py index 174eec8d0..52193cb4f 100755 --- a/gramps/src/gramps.py +++ b/gramps/src/gramps.py @@ -18,6 +18,7 @@ intl.bindtextdomain("gramps",locale) import gramps_main import sys +import locale try: if len(sys.argv) > 1: diff --git a/gramps/src/mergedata.glade b/gramps/src/mergedata.glade index a14e35964..9e8e1bbf6 100644 --- a/gramps/src/mergedata.glade +++ b/gramps/src/mergedata.glade @@ -297,7 +297,7 @@ GTK_WIN_POS_NONE True False - False + True False False False @@ -377,7 +377,7 @@ GtkVBox vbox1 - 600 + 620 False 0 @@ -616,78 +616,6 @@ - - GtkRadioButton - bfather1 - True - - False - True - father - - 2 - 3 - 8 - 9 - 0 - 0 - False - False - True - False - False - False - - - - - GtkRadioButton - death1 - True - - True - True - death - - 2 - 3 - 5 - 6 - 0 - 0 - False - False - True - True - False - False - - - - - GtkRadioButton - bbirth1 - True - - False - True - birth - - 2 - 3 - 2 - 3 - 0 - 0 - False - False - True - True - False - False - - - GtkEntry name1_text @@ -1030,6 +958,78 @@ True + + + GtkRadioButton + bfather1 + True + + False + True + father + + 2 + 3 + 8 + 10 + 0 + 0 + False + False + True + False + False + False + + + + + GtkRadioButton + death1 + True + + True + True + death + + 2 + 3 + 5 + 7 + 0 + 0 + False + False + True + True + False + False + + + + + GtkRadioButton + bbirth1 + True + + False + True + birth + + 2 + 3 + 2 + 4 + 0 + 0 + False + False + True + True + False + False + + @@ -1079,30 +1079,6 @@ - - GtkRadioButton - death2 - True - - False - True - death - - 2 - 3 - 5 - 6 - 0 - 0 - False - False - True - False - False - False - - - GtkLabel label13 @@ -1233,30 +1209,6 @@ - - GtkRadioButton - bbirth2 - True - - False - True - birth - - 2 - 3 - 2 - 3 - 0 - 0 - False - False - True - False - False - False - - - GtkLabel label32 @@ -1283,30 +1235,6 @@ - - GtkRadioButton - bfather2 - True - - False - True - father - - 2 - 3 - 8 - 9 - 0 - 0 - False - False - True - False - False - False - - - GtkEntry name2_text @@ -1649,6 +1577,78 @@ True + + + GtkRadioButton + bbirth2 + True + + False + True + birth + + 2 + 3 + 2 + 4 + 0 + 0 + False + False + True + False + False + False + + + + + GtkRadioButton + death2 + True + + False + True + death + + 2 + 3 + 5 + 7 + 0 + 0 + False + False + True + False + False + False + + + + + GtkRadioButton + bfather2 + True + + False + True + father + + 2 + 3 + 8 + 10 + 0 + 0 + False + False + True + False + False + False + + diff --git a/gramps/src/plugins/AncestorChart.py b/gramps/src/plugins/AncestorChart.py index 1cbb76c76..b36a53e0b 100644 --- a/gramps/src/plugins/AncestorChart.py +++ b/gramps/src/plugins/AncestorChart.py @@ -40,7 +40,7 @@ _ = intl.gettext # #------------------------------------------------------------------------ def pt2cm(pt): - return (float(pt)/72.0)*2.54 + return (float(pt)/72.0)*(254.0/100.0) #------------------------------------------------------------------------ # @@ -161,14 +161,14 @@ class AncestorChart: width = 0 self.filter(self.start,1) - self.height = self.lines*pt2cm(1.25*self.font.get_size()) + self.height = self.lines*pt2cm((125.0*self.font.get_size())/100.0) self.box_width = pt2cm(self.box_width+20) start = self.doc.get_right_margin() - delta = (self.doc.get_usable_width() - (self.box_width + 0.5))/3.0 + delta = (self.doc.get_usable_width() - (self.box_width + (5.0/10.0)))/3.0 uh = self.doc.get_usable_height() - ystart = self.doc.get_top_margin() - ((self.height+0.3)/2.0) + ystart = self.doc.get_top_margin() - ((self.height+(3.0/10.0))/2.0) self.x = [start, start + delta, start + (2*delta), start + (3*delta)] self.y = [ ystart + (uh/2.0), ystart + (uh/4.0), ystart + 3*(uh/4.0), ystart + (uh/8.0), diff --git a/gramps/src/utils.py b/gramps/src/utils.py index 7bd71b7fb..f1a6cb6eb 100644 --- a/gramps/src/utils.py +++ b/gramps/src/utils.py @@ -168,16 +168,10 @@ def destroy_passed_object(obj): # #------------------------------------------------------------------------- -if string.find("%.3f" % 1.2, ",") == -1: - def txt2fl(st): - return string.atof(string.replace(st,',','.')) - def fl2txt(fmt,val): - return fmt % val -else: - def txt2fl(st): - return string.atof(string.replace(st,'.',',')) - def fl2txt(fmt,val): - return string.replace(fmt % val, ',', '.') +def txt2fl_(st): + return string.atof(string.replace(st,',','.')) +def fl2txt(fmt,val): + return string.replace(fmt % val, ',', '.') #------------------------------------------------------------------------- #