]> git.eshelyaron.com Git - emacs.git/commitdiff
(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 5c2501800fe563508868d76d878ad20e9fdb9f76..99e0cde333cb7b58d643be08c16aca5f7a7b4a1a 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 4d8c9725844cb37c10d17022fad156a4b794a37d..e526394122b5b1ccd2bc0cc4089e2b3dfd395b27 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))
     {