Merge pull request #206 from prculley/bug9549
bug 9549 Chinese characters are not rendered properly in pdf reports
This commit is contained in:
commit
fa701fbbee
@ -294,6 +294,7 @@ register('paths.quick-backup-filename',
|
|||||||
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"))
|
||||||
|
@ -46,6 +46,7 @@ from .gen.const import APP_GRAMPS, USER_DIRLIST, HOME_DIR
|
|||||||
from .gen.constfunc import mac
|
from .gen.constfunc import mac
|
||||||
from .version import VERSION_TUPLE
|
from .version import VERSION_TUPLE
|
||||||
from .gen.constfunc import win, get_env_var
|
from .gen.constfunc import win, get_env_var
|
||||||
|
from .gen.config import config
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -473,6 +474,9 @@ def main():
|
|||||||
resource_path, filename = os.path.split(os.path.abspath(__file__))
|
resource_path, filename = os.path.split(os.path.abspath(__file__))
|
||||||
resource_path, dirname = os.path.split(resource_path)
|
resource_path, dirname = os.path.split(resource_path)
|
||||||
os.environ['GRAMPS_RESOURCES'] = resource_path
|
os.environ['GRAMPS_RESOURCES'] = resource_path
|
||||||
|
if win() and ('PANGOCAIRO_BACKEND' not in os.environ) and \
|
||||||
|
config.get('preferences.alternate-fonthandler'):
|
||||||
|
os.environ['PANGOCAIRO_BACKEND'] = "fontconfig"
|
||||||
errors = run()
|
errors = run()
|
||||||
if errors and isinstance(errors, list):
|
if errors and isinstance(errors, list):
|
||||||
for error in errors:
|
for error in errors:
|
||||||
|
@ -66,6 +66,7 @@ from gramps.gen.plug.utils import available_updates
|
|||||||
from .plug import PluginWindows
|
from .plug import PluginWindows
|
||||||
from gramps.gen.errors import WindowActiveError
|
from gramps.gen.errors import WindowActiveError
|
||||||
from .spell import HAVE_GTKSPELL
|
from .spell import HAVE_GTKSPELL
|
||||||
|
from gramps.gen.constfunc import win
|
||||||
_ = glocale.translation.gettext
|
_ = glocale.translation.gettext
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -1291,6 +1292,13 @@ class GrampsPreferences(ConfigureDialog):
|
|||||||
grid.set_row_spacing(6)
|
grid.set_row_spacing(6)
|
||||||
|
|
||||||
current_line = 0
|
current_line = 0
|
||||||
|
if win():
|
||||||
|
self.add_checkbox(grid,
|
||||||
|
_('Use alternate Font handler for GUI and Reports '
|
||||||
|
'(requires restart)'),
|
||||||
|
current_line, 'preferences.alternate-fonthandler')
|
||||||
|
|
||||||
|
current_line += 1
|
||||||
self.add_checkbox(grid,
|
self.add_checkbox(grid,
|
||||||
_('Add default source on GEDCOM import'),
|
_('Add default source on GEDCOM import'),
|
||||||
current_line, 'preferences.default-source')
|
current_line, 'preferences.default-source')
|
||||||
|
Loading…
Reference in New Issue
Block a user