diff --git a/ChangeLog b/ChangeLog index 69c3394c2..51cfa113b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-03-08 Brian Matherly + * src/docgen/PdfDoc.py: + 0001917: UI font gets small when creating PDF documents. + 2008-03-08 Brian Matherly * src/gen/lib/note.py: * src/Editors/_EditNote.py: diff --git a/src/docgen/PdfDoc.py b/src/docgen/PdfDoc.py index f8531cceb..b91cea61e 100644 --- a/src/docgen/PdfDoc.py +++ b/src/docgen/PdfDoc.py @@ -1,7 +1,8 @@ # # 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 # 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() @@ -117,6 +119,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: