Fix graphs on Windows for font selection not working (#850)

Fixes #11212
This commit is contained in:
Paul Culley 2019-07-31 16:46:09 -05:00 committed by GitHub
parent ede3707b51
commit 5c6a0ebff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 14 deletions

View File

@ -241,7 +241,6 @@ register('preferences.quick-backup-include-mode', False)
register('preferences.date-format', 0)
register('preferences.calendar-format-report', 0)
register('preferences.cprefix', 'C%04d')
register('preferences.alternate-fonthandler', False)
register('preferences.default-source', False)
register('preferences.tag-on-import', False)
register('preferences.tag-on-import-format', _("Imported %Y/%m/%d %H:%M:%S"))

View File

@ -65,7 +65,7 @@ LOG = logging.getLogger(".graphdoc")
# Private Constants
#
#-------------------------------------------------------------------------
_FONTS = [{'name' : _("Default"), 'value' : ""},
_FONTS = [{'name' : _("Default"), 'value' : "serif"},
{'name' : _("PostScript / Helvetica"), 'value' : "Helvetica"},
{'name' : _("TrueType / FreeSans"), 'value' : "FreeSans"}]

View File

@ -452,14 +452,11 @@ def run():
# if in safe mode we should point the db dir back to the original dir.
# It is ok to import config here, 'Defaults' command had its chance...
from .gen.config import config
if 'SAFEMODE' in os.environ:
config.set('database.path', os.path.join(ORIG_HOME_DIR, 'grampsdb'))
# On windows the fontconfig handler may be a better choice; ask user to
# choose for now.
if(win() and ('PANGOCAIRO_BACKEND' not in os.environ) and
config.get('preferences.alternate-fonthandler')):
# On windows the fontconfig handler is a better choice
if(win() and ('PANGOCAIRO_BACKEND' not in os.environ)):
os.environ['PANGOCAIRO_BACKEND'] = "fontconfig"
# Calls to LOG must be after setup_logging() and ArgParser()

View File

@ -1550,13 +1550,6 @@ class GrampsPreferences(ConfigureDialog):
justify=Gtk.Justification.CENTER, align=Gtk.Align.CENTER)
current_line = 1
if win():
self.add_checkbox(
grid, _('Use alternate Font handler for GUI and Reports '
'(requires restart)'),
current_line, 'preferences.alternate-fonthandler', stop=3,
tooltip=_("Can help to fix problems with fonts."))
current_line += 1
self.add_checkbox(grid, _('Add default source on GEDCOM import'),
current_line, 'preferences.default-source', stop=3)