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.date-format', 0)
register('preferences.calendar-format-report', 0) register('preferences.calendar-format-report', 0)
register('preferences.cprefix', 'C%04d') register('preferences.cprefix', 'C%04d')
register('preferences.alternate-fonthandler', False)
register('preferences.default-source', False) register('preferences.default-source', False)
register('preferences.tag-on-import', False) register('preferences.tag-on-import', False)
register('preferences.tag-on-import-format', _("Imported %Y/%m/%d %H:%M:%S")) 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 # Private Constants
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
_FONTS = [{'name' : _("Default"), 'value' : ""}, _FONTS = [{'name' : _("Default"), 'value' : "serif"},
{'name' : _("PostScript / Helvetica"), 'value' : "Helvetica"}, {'name' : _("PostScript / Helvetica"), 'value' : "Helvetica"},
{'name' : _("TrueType / FreeSans"), 'value' : "FreeSans"}] {'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. # 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... # It is ok to import config here, 'Defaults' command had its chance...
from .gen.config import config
if 'SAFEMODE' in os.environ: if 'SAFEMODE' in os.environ:
config.set('database.path', os.path.join(ORIG_HOME_DIR, 'grampsdb')) config.set('database.path', os.path.join(ORIG_HOME_DIR, 'grampsdb'))
# On windows the fontconfig handler may be a better choice; ask user to # On windows the fontconfig handler is a better choice
# choose for now. if(win() and ('PANGOCAIRO_BACKEND' not in os.environ)):
if(win() and ('PANGOCAIRO_BACKEND' not in os.environ) and
config.get('preferences.alternate-fonthandler')):
os.environ['PANGOCAIRO_BACKEND'] = "fontconfig" os.environ['PANGOCAIRO_BACKEND'] = "fontconfig"
# Calls to LOG must be after setup_logging() and ArgParser() # 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) justify=Gtk.Justification.CENTER, align=Gtk.Align.CENTER)
current_line = 1 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'), self.add_checkbox(grid, _('Add default source on GEDCOM import'),
current_line, 'preferences.default-source', stop=3) current_line, 'preferences.default-source', stop=3)