]> git.eshelyaron.com Git - emacs.git/commitdiff
(build_scalable_font_name): Round pixel size to the
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Wed, 1 Jun 2005 08:21:48 +0000 (08:21 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Wed, 1 Jun 2005 08:21:48 +0000 (08:21 +0000)
nearest integer.

src/ChangeLog
src/xfaces.c

index 367665e77738e1ca60b39b71c6168c68e3709b10..47ef8fb47f12814ad7c08901f05b6f0cc2fb8b37 100644 (file)
@@ -1,3 +1,11 @@
+2005-06-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * macterm.c (mac_to_x_fontname, mac_do_list_fonts): Set XLFD
+       resolution fields for scalable fonts to 0.
+
+       * xfaces.c (build_scalable_font_name): Round pixel size to the
+       nearest integer.
+
 2005-06-01  Kim F. Storm  <storm@cua.dk>
 
        * xdisp.c (display_mode_line): Support nested calls to redisplay
        (x_scroll_bar_handle_click): Change type of second argument from
        int to ControlPartCode.
        (check_alarm): Remove declaration.
-       (XTread_Socket) [!TARGET_API_MAC_CARBON]: Don't call it.
-       (XTread_Socket): Use ControlPartCode instead of SInt16.
+       (XTread_socket) [!TARGET_API_MAC_CARBON]: Don't call it.
+       (XTread_socket): Use ControlPartCode instead of SInt16.
 
 2005-05-13  Nozomu Ando  <nand@mac.com>
 
index 0b0b2f97533eab4238e855cbdec057a1281ec833..21bdb88c860b0434e82f1cfc092e8ef5acd0fae7 100644 (file)
@@ -6435,12 +6435,12 @@ build_scalable_font_name (f, font, specified_pt)
   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;