0001917: UI font gets small when creating PDF documents.
svn: r10233
This commit is contained in:
parent
fa0b508924
commit
c247caa5e9
@ -1,3 +1,7 @@
|
||||
2008-03-08 Brian Matherly <brian@gramps-project.org>
|
||||
* src/docgen/PdfDoc.py:
|
||||
0001917: UI font gets small when creating PDF documents.
|
||||
|
||||
2008-03-08 Brian Matherly <brian@gramps-project.org>
|
||||
* src/gen/lib/note.py:
|
||||
* src/Editors/_EditNote.py:
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2007 Zsolt Foldvari
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
#
|
||||
# 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
|
||||
@ -91,6 +92,7 @@ class PdfDoc(CairoDoc):
|
||||
cr = pangocairo.CairoContext(cairo.Context(surface))
|
||||
|
||||
fontmap = pangocairo.cairo_font_map_get_default()
|
||||
saved_resolution = fontmap.get_resolution()
|
||||
fontmap.set_resolution(DPI)
|
||||
|
||||
pango_context = fontmap.create_context()
|
||||
@ -118,6 +120,10 @@ class PdfDoc(CairoDoc):
|
||||
# close the surface (file)
|
||||
surface.finish()
|
||||
|
||||
# Restore the resolution. On windows, Gramps UI fonts will be smaller
|
||||
# if we don't restore the resolution.
|
||||
fontmap.set_resolution(saved_resolution)
|
||||
|
||||
# load the result into an external viewer
|
||||
if self.print_req:
|
||||
app = Mime.get_application('application/pdf')
|
||||
|
Loading…
Reference in New Issue
Block a user