diff --git a/gramps/src/FontScale.py b/gramps/src/FontScale.py index 26ef86234..b6de44cdd 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, 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] +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] _swiss_b = [ - 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] +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] _swiss_i = [ - 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] +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] _swiss_bi = [ - 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] +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] _roman = [ - 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] +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] _roman_b = [ - 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] +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] _roman_i = [ - 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] +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] _roman_bi = [ - 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] +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] _font_array = [ [_swiss, _swiss_b, _swiss_i, _swiss_bi ], [_roman, _roman_b, _roman_i, _roman_bi ] ] @@ -253,10 +253,8 @@ 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)]/scale) + r = r + l[ord(c)] return (r+1)*s - diff --git a/gramps/src/OpenDrawDoc.py b/gramps/src/OpenDrawDoc.py index 7d89bceb4..8d5b15a59 100644 --- a/gramps/src/OpenDrawDoc.py +++ b/gramps/src/OpenDrawDoc.py @@ -27,7 +27,6 @@ from DrawDoc import * from latin_utf8 import latin_to_utf8 import const -from utils import fl2txt try: from codecs import * @@ -258,7 +257,7 @@ class OpenDrawDoc(DrawDoc): self.f.write('\n') @@ -299,17 +298,17 @@ class OpenDrawDoc(DrawDoc): self.f.write('\n') self.f.write('\n') self.f.write('\n') - self.f.write('\n' % fl2txt("%.2f",self.rmargin)) + self.f.write('fo:margin-top="%.2fcm" ' % self.tmargin) + self.f.write('fo:margin-bottom="%.2fcm" ' % self.bmargin) + self.f.write('fo:margin-left="%.2fcm" ' % self.lmargin) + self.f.write('fo:margin-right="%.2fcm"/>\n' % self.rmargin) self.f.write('\n') self.f.write('\n') self.f.write('\n') @@ -416,10 +415,10 @@ class OpenDrawDoc(DrawDoc): def draw_line(self,style,x1,y1,x2,y2): self.f.write('\n' % fl2txt("%.3f",y2)) + self.f.write('" svg:x1="%.3fcm" ' % x1) + self.f.write('svg:y1="%.3fcm" ' % y1) + self.f.write('svg:x2="%.3fcm" ' % x2) + self.f.write('svg:y2="%.3fcm"/>\n' % y2) def draw_box(self,style,text,x,y): box_style = self.draw_styles[style] @@ -428,10 +427,10 @@ class OpenDrawDoc(DrawDoc): self.f.write('') text = latin_to_utf8(string.replace(text,'\n','')) diff --git a/gramps/src/gramps.py b/gramps/src/gramps.py index 52193cb4f..604a5a8e7 100755 --- a/gramps/src/gramps.py +++ b/gramps/src/gramps.py @@ -5,16 +5,18 @@ import intl import os import gtk import gnome.ui - +import locale intl.textdomain("gramps") if os.environ.has_key("GRAMPSI18N"): - locale = os.environ["GRAMPSI18N"] + loc = os.environ["GRAMPSI18N"] else: - locale = "locale" + loc = "locale" -intl.bindtextdomain("gramps",locale) +intl.bindtextdomain("gramps",loc) + +locale.setlocale(locale.LC_NUMERIC,"C") import gramps_main import sys