(Ffont_face_attributes): Multiply pixel size before point
authorJason Rumney <jasonr@gnu.org>
Tue, 24 Jun 2008 10:32:03 +0000 (10:32 +0000)
committerJason Rumney <jasonr@gnu.org>
Tue, 24 Jun 2008 10:32:03 +0000 (10:32 +0000)
conversion to avoid multiplying rounding error.

src/ChangeLog
src/font.c

index 5c25018..99e0cde 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-24  Jason Rumney  <jasonr@gnu.org>
+
+        * font.c (Ffont_face_attributes): Multiply pixel size before point
+        conversion to avoid multiplying rounding error.
+
 2008-06-23  Jason Rumney  <jasonr@gnu.org>
 
        * w32term.c (x_draw_glyph_string_background)
index 4d8c972..e526394 100644 (file)
@@ -3800,7 +3800,7 @@ are to be displayed on.  If omitted, the selected frame is used.  */)
       Lisp_Object font_dpi = AREF (font, FONT_DPI_INDEX);
       int dpi = INTEGERP (font_dpi) ? XINT (font_dpi) : f->resy;
       plist[n++] = QCheight;
-      plist[n++] = make_number (10 * PIXEL_TO_POINT (XINT (val), dpi));
+      plist[n++] = make_number (PIXEL_TO_POINT (XINT (val) * 10, dpi));
     }
   else if (FLOATP (val))
     {