diff options
| author | Jason Rumney | 2008-06-24 10:31:12 +0000 |
|---|---|---|
| committer | Jason Rumney | 2008-06-24 10:31:12 +0000 |
| commit | c4e8ee5e6f2f42cf26b54ced44f06de13347226f (patch) | |
| tree | 31d5777676ee6b7b650bdbbde27bd425bc1e1b11 /src | |
| parent | 3a8105cd572a5ed05f2f53878e70465d8a9a726a (diff) | |
| download | emacs-c4e8ee5e6f2f42cf26b54ced44f06de13347226f.tar.gz emacs-c4e8ee5e6f2f42cf26b54ced44f06de13347226f.zip | |
(PIXEL_TO_POINT): Clarify usage in comment.
Diffstat (limited to 'src')
| -rw-r--r-- | src/font.h | 7 |
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 |