aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2008-06-24 10:31:12 +0000
committerJason Rumney2008-06-24 10:31:12 +0000
commitc4e8ee5e6f2f42cf26b54ced44f06de13347226f (patch)
tree31d5777676ee6b7b650bdbbde27bd425bc1e1b11
parent3a8105cd572a5ed05f2f53878e70465d8a9a726a (diff)
downloademacs-c4e8ee5e6f2f42cf26b54ced44f06de13347226f.tar.gz
emacs-c4e8ee5e6f2f42cf26b54ced44f06de13347226f.zip
(PIXEL_TO_POINT): Clarify usage in comment.
-rw-r--r--src/font.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/font.h b/src/font.h
index 522343255e7..2419e196186 100644
--- a/src/font.h
+++ b/src/font.h
@@ -477,8 +477,11 @@ struct font_bitmap
477 on resolution DPI. */ 477 on resolution DPI. */
478#define POINT_TO_PIXEL(POINT, DPI) ((POINT) * (DPI) / PT_PER_INCH + 0.5) 478#define POINT_TO_PIXEL(POINT, DPI) ((POINT) * (DPI) / PT_PER_INCH + 0.5)
479 479
480/* Return a point size (double) corresponding to POINT size (integer) 480/* Return a point size corresponding to POINT size (integer)
481 on resolution DPI. */ 481 on resolution DPI. Note that though point size is a double, we expect
482 it to be rounded to an int, so we add 0.5 here. If the desired value
483 is tenths of points (as in xfld specs), then the pixel size should
484 be multiplied BEFORE the conversion to avoid magnifying the error. */
482#define PIXEL_TO_POINT(PIXEL, DPI) ((PIXEL) * PT_PER_INCH / (DPI) + 0.5) 485#define PIXEL_TO_POINT(PIXEL, DPI) ((PIXEL) * PT_PER_INCH / (DPI) + 0.5)
483 486
484/* Ignore the difference of font pixel sizes less than or equal to 487/* Ignore the difference of font pixel sizes less than or equal to