diff src/xfaces.c @ 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 f658c441541a
children 24f25f7c89cd 6aee1e9b0bd7
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;