comparison src/font.h @ 96226:1c73e69fc195

(PIXEL_TO_POINT): Clarify usage in comment.
author Jason Rumney <jasonr@gnu.org>
date Tue, 24 Jun 2008 10:31:12 +0000
parents 66f0213be62a
children eed170a61843
comparison
equal deleted inserted replaced
96225:c81ae89820a4 96226:1c73e69fc195
475 475
476 /* Return a pixel size (integer) corresponding to POINT size (double) 476 /* Return a pixel size (integer) corresponding to POINT size (double)
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
485 this value. */ 488 this value. */
486 #define FONT_PIXEL_SIZE_QUANTUM 1 489 #define FONT_PIXEL_SIZE_QUANTUM 1