From 02a6375c0eb40fe699c7b7334e6bedb804fd87c9 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 1 Jun 2005 08:21:48 +0000 Subject: [PATCH] (build_scalable_font_name): Round pixel size to the nearest integer. --- src/ChangeLog | 12 ++++++++++-- src/xfaces.c | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 367665e7773..47ef8fb47f1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2005-06-01 YAMAMOTO Mitsuharu + + * macterm.c (mac_to_x_fontname, mac_do_list_fonts): Set XLFD + resolution fields for scalable fonts to 0. + + * xfaces.c (build_scalable_font_name): Round pixel size to the + nearest integer. + 2005-06-01 Kim F. Storm * xdisp.c (display_mode_line): Support nested calls to redisplay @@ -215,8 +223,8 @@ (x_scroll_bar_handle_click): Change type of second argument from int to ControlPartCode. (check_alarm): Remove declaration. - (XTread_Socket) [!TARGET_API_MAC_CARBON]: Don't call it. - (XTread_Socket): Use ControlPartCode instead of SInt16. + (XTread_socket) [!TARGET_API_MAC_CARBON]: Don't call it. + (XTread_socket): Use ControlPartCode instead of SInt16. 2005-05-13 Nozomu Ando 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; -- 2.39.5