emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/font.h,v


From: Jason Rumney
Subject: [Emacs-diffs] Changes to emacs/src/font.h,v
Date: Tue, 24 Jun 2008 10:31:13 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Jason Rumney <jasonr>   08/06/24 10:31:12

Index: font.h
===================================================================
RCS file: /sources/emacs/emacs/src/font.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- font.h      16 Jun 2008 09:11:05 -0000      1.16
+++ font.h      24 Jun 2008 10:31:12 -0000      1.17
@@ -477,8 +477,11 @@
    on resolution DPI.  */
 #define POINT_TO_PIXEL(POINT, DPI) ((POINT) * (DPI) / PT_PER_INCH + 0.5)
 
-/* Return a point size (double) corresponding to POINT size (integer)
-   on resolution DPI.  */
+/* Return a point size corresponding to POINT size (integer)
+   on resolution DPI. Note that though point size is a double, we expect
+   it to be rounded to an int, so we add 0.5 here. If the desired value
+   is tenths of points (as in xfld specs), then the pixel size should
+   be multiplied BEFORE the conversion to avoid magnifying the error.  */
 #define PIXEL_TO_POINT(PIXEL, DPI) ((PIXEL) * PT_PER_INCH / (DPI) + 0.5)
 
 /* Ignore the difference of font pixel sizes less than or equal to




reply via email to

[Prev in Thread] Current Thread [Next in Thread]