mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
bug 2167: previews badly placed when ascent or descent is 0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13273 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
215476903e
commit
5bad987680
@ -1,3 +1,9 @@
|
||||
2006-02-24 Enrico Forestieri <forenr@tlc.unipr.it>
|
||||
|
||||
* scripts/legacy_lyxpreview2ppm.py (extract_metrics_info):
|
||||
* scripts/lyxpreview2bitmap.py (extract_metrics_info): fix
|
||||
computation when either ascent or descent is 0. (bug 2167)
|
||||
|
||||
2006-02-19 Enrico Forestieri <forenr@tlc.unipr.it>
|
||||
|
||||
* scripts/lyxpreview2bitmap.py: fix script to work with recent versions
|
||||
|
@ -95,7 +95,7 @@ def extract_metrics_info(log_file, metrics_file):
|
||||
descent = string.atoi(match.group(3))
|
||||
|
||||
frac = 0.5
|
||||
if ascent > 0 and descent > 0:
|
||||
if ascent >= 0 and descent >= 0:
|
||||
ascent = float(ascent) + tp_ascent
|
||||
descent = float(descent) - tp_descent
|
||||
|
||||
|
@ -103,7 +103,7 @@ def extract_metrics_info(dvipng_stdout, metrics_file):
|
||||
ascent = string.atof(match.group(2))
|
||||
|
||||
frac = 0.5
|
||||
if ascent > 0 and descent > 0:
|
||||
if ascent >= 0 and descent >= 0:
|
||||
if abs(ascent + descent) > 0.1:
|
||||
frac = ascent / (ascent + descent)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user