Description: scale miscalculated for --cpi option Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=514332 Bug-Debian: http://bugs.debian.org/514332 Author: Alexander Prinsier Forwarded: http://sourceforge.net/tracker/?func=detail&aid=2572267&group_id=153049&atid=786239 --- a/src/paps.c +++ b/src/paps.c @@ -465,12 +465,12 @@ w = pango_font_metrics_get_approximate_digit_width (metrics); if (w > max_width) max_width = w; - page_layout.scale_x = 1 / page_layout.cpi * 72.0 * PANGO_SCALE / max_width; + page_layout.scale_x = 1.0 / page_layout.cpi * 72.0 * (double)PANGO_SCALE / (double)max_width; pango_font_metrics_unref (metrics); g_object_unref (G_OBJECT (fontmap)); // Now figure out how to scale the font to get that size - scale = 1 / page_layout.cpi * 72.0 * PANGO_SCALE / max_width; + scale = 1.0 / page_layout.cpi * 72.0 * (double)PANGO_SCALE / (double)max_width; // update the font size to that width pango_font_description_set_size (font_description, (int)(atoi(DEFAULT_FONT_SIZE) * PANGO_SCALE * scale));