Part 1 of issue 4276. I principle same patch as for branch, but adapeted to trunk.

svn: r15959
This commit is contained in:
Peter Landgren
2010-10-09 12:33:47 +00:00
parent 5ba9d48f86
commit 1d8a776cd3
27 changed files with 118 additions and 45 deletions

View File

@@ -30,6 +30,7 @@
#
#------------------------------------------------------------------------
from gen.ggettext import gettext as _
import sys
#------------------------------------------------------------------------
#
@@ -85,7 +86,8 @@ class PdfDoc(libcairodoc.CairoDoc):
top_margin = self.paper.get_top_margin() * DPI / 2.54
# create cairo context and pango layout
surface = cairo.PDFSurface(self._backend.filename, paper_width, paper_height)
filename = self._backend.filename.encode(sys.getfilesystemencoding())
surface = cairo.PDFSurface(filename, paper_width, paper_height)
surface.set_fallback_resolution(300, 300)
cr = pangocairo.CairoContext(cairo.Context(surface))