changeset 62945:179873645b73

(build_scalable_font_name): Round pixel size to the nearest integer.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Wed, 01 Jun 2005 08:21:25 +0000
parents 35f25c15b8c2
children f3d98f3c498a
files src/xfaces.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Wed Jun 01 08:20:50 2005 +0000
+++ b/src/xfaces.c	Wed Jun 01 08:21:25 2005 +0000
@@ -6435,12 +6435,12 @@
   if (font->numeric[XLFD_RESY] != 0)
     {
       pt = resy / font->numeric[XLFD_RESY] * specified_pt + 0.5;
-      pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt;
+      pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt + 0.5;
     }
   else
     {
       pt = specified_pt;
-      pixel_value = resy / (PT_PER_INCH * 10.0) * pt;
+      pixel_value = resy / (PT_PER_INCH * 10.0) * pt + 0.5;
     }
   /* We may need a font of the different size.  */
   pixel_value *= font->rescale_ratio;