Fix graphs on Windows for font selection not working (#850)
Fixes #11212
This commit is contained in:
parent
ede3707b51
commit
5c6a0ebff3
@ -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"))
|
||||||
|
@ -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"}]
|
||||||
|
|
||||||
|
@ -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()
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user