* src/docgen/Makefile.am, src/docgen/Makefile.in: Ship LPRDoc.py.
* src/plugins/GraphViz.py (dump_index): Remove utf8 to latin conversion. Switch to FreeSans. * src/docgen/PdfDoc.py (draw_text, rotate_text): Fix encoding. svn: r3024
This commit is contained in:
parent
9fc3b43afb
commit
ac6d3e74e0
@ -13,7 +13,8 @@ pkgpython_PYTHON = \
|
||||
PdfDoc.py\
|
||||
PSDrawDoc.py\
|
||||
RTFDoc.py\
|
||||
SvgDrawDoc.py
|
||||
SvgDrawDoc.py\
|
||||
LPRDoc.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/docgen
|
||||
pkgpythondir = @pkgpythondir@/docgen
|
||||
|
@ -118,7 +118,8 @@ pkgpython_PYTHON = \
|
||||
PdfDoc.py\
|
||||
PSDrawDoc.py\
|
||||
RTFDoc.py\
|
||||
SvgDrawDoc.py
|
||||
SvgDrawDoc.py\
|
||||
LPRDoc.py
|
||||
|
||||
|
||||
GRAMPS_PY_MODPATH = "../"
|
||||
|
@ -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,
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user