]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/legacy_lyxpreview2ppm.py
Fix bug 3220
[lyx.git] / lib / scripts / legacy_lyxpreview2ppm.py
index b3b743a4bae4075837c90f8ecf9d0bada8cd314a..cb9ff4d08bf4ac8bd714eaeed65027fba58f6240 100644 (file)
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
-# -*- coding: iso-8859-1 -*-
+# -*- coding: utf-8 -*-
 
 # file legacy_lyxpreview2ppm.py
 # This file is part of LyX, the document processor.
@@ -10,7 +10,7 @@
 
 # with much advice from members of the preview-latex project:
 #   David Kastrup, dak@gnu.org and
-#   Jan-Åke Larsson, jalar@mai.liu.se.
+#   Jan-Åke Larsson, jalar@mai.liu.se.
 # and with much help testing the code under Windows from
 #   Paul A. Rubin, rubin@msu.edu.
 
@@ -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