aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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