diff --git a/gramps2/src/docgen/Makefile.am b/gramps2/src/docgen/Makefile.am index b789e272b..81bf26a5b 100644 --- a/gramps2/src/docgen/Makefile.am +++ b/gramps2/src/docgen/Makefile.am @@ -13,7 +13,8 @@ pkgpython_PYTHON = \ PdfDoc.py\ PSDrawDoc.py\ RTFDoc.py\ - SvgDrawDoc.py + SvgDrawDoc.py\ + LPRDoc.py pkgpyexecdir = @pkgpyexecdir@/docgen pkgpythondir = @pkgpythondir@/docgen diff --git a/gramps2/src/docgen/Makefile.in b/gramps2/src/docgen/Makefile.in index 0595fc9a7..73f749026 100644 --- a/gramps2/src/docgen/Makefile.in +++ b/gramps2/src/docgen/Makefile.in @@ -118,7 +118,8 @@ pkgpython_PYTHON = \ PdfDoc.py\ PSDrawDoc.py\ RTFDoc.py\ - SvgDrawDoc.py + SvgDrawDoc.py\ + LPRDoc.py GRAMPS_PY_MODPATH = "../" diff --git a/gramps2/src/docgen/PdfDoc.py b/gramps2/src/docgen/PdfDoc.py index 6d98b411b..459592474 100644 --- a/gramps2/src/docgen/PdfDoc.py +++ b/gramps2/src/docgen/PdfDoc.py @@ -454,13 +454,13 @@ class PdfDoc(BaseDoc.BaseDoc): fc = make_color(font.get_color()) fnt = self.pdf_set_font(font) if p.get_alignment() == BaseDoc.PARA_ALIGN_CENTER: - twidth = ((FontScale.string_width(font,str(text)))/2.0)*cm + twidth = ((FontScale.string_width(font,enc(text)))/2.0)*cm xcm = (stype.get_width() - x) - twidth else: xcm = x * cm s = reportlab.graphics.shapes.String(xcm, y-size, - str(text), + enc(text), strokeColor=sc, fillColor=fc, fontName=fnt, @@ -493,7 +493,7 @@ class PdfDoc(BaseDoc.BaseDoc): sc = make_color(font.get_color()) fc = make_color(font.get_color()) for line in text: - s = reportlab.graphics.shapes.String(0,yval,str(line), + s = reportlab.graphics.shapes.String(0,yval,enc(line), fontName=fnt, fontSize=size, strokeColor=sc, diff --git a/gramps2/src/plugins/GraphViz.py b/gramps2/src/plugins/GraphViz.py index c575e061a..32a2e45fb 100644 --- a/gramps2/src/plugins/GraphViz.py +++ b/gramps2/src/plugins/GraphViz.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2003 Donald N. Allingham +# Copyright (C) 2000-2004 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + "Generate files/Relationship graph" #------------------------------------------------------------------------ @@ -64,6 +66,9 @@ _pagecount_map = { _("Multiple") : _multiple, } +_PS_FONT = 'Helvetica' +_TT_FONT = 'FreeSans' + #------------------------------------------------------------------------ # # GraphVizDialog @@ -150,12 +155,12 @@ class GraphVizDialog(Report.ReportDialog): menu = gtk.Menu() menuitem = gtk.MenuItem(_("TrueType")) - menuitem.set_data('t', 'Arial') + menuitem.set_data('t', _TT_FONT) menuitem.show() menu.append(menuitem) menuitem = gtk.MenuItem(_("PostScript")) - menuitem.set_data('t', 'Helvetica') + menuitem.set_data('t', _PS_FONT) menuitem.show() menu.append(menuitem) @@ -474,7 +479,10 @@ def dump_index(person_list,file,includedates,includeurl,colorize, file.write('color=deeppink, ') else: file.write('color=black, ') - file.write('fontname="%s", label="%s"];\n' % (font,utf8_to_latin(label))) + if font == _TT_FONT: + file.write('fontname="%s", label="%s"];\n' % (font,label)) + else: + file.write('fontname="%s", label="%s"];\n' % (font,utf8_to_latin(label))) # Output families's nodes. if show_families: family_list = person.get_family_id_list()