# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1117614085 0 # Node ID 179873645b733172695a117a388d55e740218442 # Parent 35f25c15b8c24f142f6d4414fd21278dff62200c (build_scalable_font_name): Round pixel size to the nearest integer. diff -r 35f25c15b8c2 -r 179873645b73 src/xfaces.c --- a/src/xfaces.c Wed Jun 01 08:20:50 2005 +0000 +++ b/src/xfaces.c Wed Jun 01 08:21:25 2005 +0000 @@ -6435,12 +6435,12 @@ if (font->numeric[XLFD_RESY] != 0) { pt = resy / font->numeric[XLFD_RESY] * specified_pt + 0.5; - pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt; + pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt + 0.5; } else { pt = specified_pt; - pixel_value = resy / (PT_PER_INCH * 10.0) * pt; + pixel_value = resy / (PT_PER_INCH * 10.0) * pt + 0.5; } /* We may need a font of the different size. */ pixel_value *= font->rescale_ratio;