+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
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
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)