[Yrogirg] configurable latex formulas font size. Fixes #3986

This commit is contained in:
Yann Leboulanger 2008-06-02 08:10:36 +00:00
parent d927d260c2
commit 8f9c097343
2 changed files with 3 additions and 9 deletions

View File

@ -250,6 +250,7 @@ class Config:
'max_conversation_lines': [opt_int, 500, _('Maximum number of lines that are printed in conversations. Oldest lines are cleared.')],
'attach_notifications_to_systray': [opt_bool, False, _('If True, notification windows from notification-daemon will be attached to systray icon.')],
'check_idle_every_foo_seconds': [opt_int, 2, _('Choose interval between 2 checks of idleness.')],
'latex_png_dpi': [opt_str, '108',_('Change the value to change the size of latex formulas displayed. The higher is larger.') ],
}
__options_per_key = {

View File

@ -854,15 +854,8 @@ class ConversationTextview:
exitcode = p.wait()
if exitcode == 0:
convert_version = helpers.get_output_of_command(
'convert -version')[0].split()[2]
convert_version = [int(n) for n in convert_version.split('.')]
if convert_version > [6, 3, 4]:
# -alpha option was added in 6.3.5 release
alpha = ['-alpha', 'off']
else:
alpha = []
p = Popen(['convert'] + alpha + [tmpfile + '.ps', tmpfile + '.png'],
latex_png_dpi = gajim.config.get('latex_png_dpi')
p = Popen(['convert', '-background', 'white', '-flatten', '-density', latex_png_dpi, tmpfile + '.ps', tmpfile + '.png'],
cwd=gettempdir())
exitcode = p.wait()