0001917: UI font gets small when creating PDF documents.
svn: r10232
This commit is contained in:
parent
3264c7c843
commit
57e1a3d376
@ -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>
|
2008-03-08 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/gen/lib/note.py:
|
* src/gen/lib/note.py:
|
||||||
* src/Editors/_EditNote.py:
|
* src/Editors/_EditNote.py:
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2007 Zsolt Foldvari
|
# Copyright (C) 2007 Zsolt Foldvari
|
||||||
|
# Copyright (C) 2008 Brian G. Matherly
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# 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))
|
cr = pangocairo.CairoContext(cairo.Context(surface))
|
||||||
|
|
||||||
fontmap = pangocairo.cairo_font_map_get_default()
|
fontmap = pangocairo.cairo_font_map_get_default()
|
||||||
|
saved_resolution = fontmap.get_resolution()
|
||||||
fontmap.set_resolution(DPI)
|
fontmap.set_resolution(DPI)
|
||||||
|
|
||||||
pango_context = fontmap.create_context()
|
pango_context = fontmap.create_context()
|
||||||
@ -118,6 +120,10 @@ class PdfDoc(CairoDoc):
|
|||||||
# close the surface (file)
|
# close the surface (file)
|
||||||
surface.finish()
|
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
|
# load the result into an external viewer
|
||||||
if self.print_req:
|
if self.print_req:
|
||||||
app = Mime.get_application('application/pdf')
|
app = Mime.get_application('application/pdf')
|
||||||
|
Loading…
Reference in New Issue
Block a user