From f1a0c539ed3a15a522d1645a12a2228de7ace77e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Aug 2011 09:49:03 -0600 Subject: [PATCH] Conversion pipeline: Fix conversion of cm/mm to pts. Fixes use of cm as a length unit when converting to MOBI. --- src/calibre/ebooks/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/__init__.py b/src/calibre/ebooks/__init__.py index c2e338ea10..8276477824 100644 --- a/src/calibre/ebooks/__init__.py +++ b/src/calibre/ebooks/__init__.py @@ -206,9 +206,9 @@ def unit_convert(value, base, font, dpi): elif unit == 'pc': result = value * 12.0 elif unit == 'mm': - result = value * 0.04 + result = value * 2.8346456693 elif unit == 'cm': - result = value * 0.40 + result = value * 28.346456693 return result def generate_masthead(title, output_path=None, width=600, height=60):