summaryrefslogtreecommitdiff
path: root/src/xfaces.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2005-06-01 08:21:48 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2005-06-01 08:21:48 +0000
commit02a6375c0eb40fe699c7b7334e6bedb804fd87c9 (patch)
tree7488e3de79b0fc6c6bc0e56b1f43e285fd07a4d9 /src/xfaces.c
parentb0241f69c9683975a06cce950e603af201c4a5cb (diff)
downloademacs-02a6375c0eb40fe699c7b7334e6bedb804fd87c9.tar.gz
(build_scalable_font_name): Round pixel size to the
nearest integer.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 0b0b2f97533..21bdb88c860 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6435,12 +6435,12 @@ build_scalable_font_name (f, font, specified_pt)
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;