Mercurial > emacs
comparison src/xfaces.c @ 62945:179873645b73
(build_scalable_font_name): Round pixel size to the
nearest integer.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Wed, 01 Jun 2005 08:21:25 +0000 |
parents | f658c441541a |
children | 24f25f7c89cd 6aee1e9b0bd7 |
comparison
equal
deleted
inserted
replaced
62944:35f25c15b8c2 | 62945:179873645b73 |
---|---|
6433 the point size we must specify from the resolution of | 6433 the point size we must specify from the resolution of |
6434 the display and the specified resolution of the font. */ | 6434 the display and the specified resolution of the font. */ |
6435 if (font->numeric[XLFD_RESY] != 0) | 6435 if (font->numeric[XLFD_RESY] != 0) |
6436 { | 6436 { |
6437 pt = resy / font->numeric[XLFD_RESY] * specified_pt + 0.5; | 6437 pt = resy / font->numeric[XLFD_RESY] * specified_pt + 0.5; |
6438 pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt; | 6438 pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt + 0.5; |
6439 } | 6439 } |
6440 else | 6440 else |
6441 { | 6441 { |
6442 pt = specified_pt; | 6442 pt = specified_pt; |
6443 pixel_value = resy / (PT_PER_INCH * 10.0) * pt; | 6443 pixel_value = resy / (PT_PER_INCH * 10.0) * pt + 0.5; |
6444 } | 6444 } |
6445 /* We may need a font of the different size. */ | 6445 /* We may need a font of the different size. */ |
6446 pixel_value *= font->rescale_ratio; | 6446 pixel_value *= font->rescale_ratio; |
6447 | 6447 |
6448 /* We should keep POINT_SIZE 0. Otherwise, X server can't open a | 6448 /* We should keep POINT_SIZE 0. Otherwise, X server can't open a |