aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2005-06-01 08:21:48 +0000
committerYAMAMOTO Mitsuharu2005-06-01 08:21:48 +0000
commit02a6375c0eb40fe699c7b7334e6bedb804fd87c9 (patch)
tree7488e3de79b0fc6c6bc0e56b1f43e285fd07a4d9 /src
parentb0241f69c9683975a06cce950e603af201c4a5cb (diff)
downloademacs-02a6375c0eb40fe699c7b7334e6bedb804fd87c9.tar.gz
emacs-02a6375c0eb40fe699c7b7334e6bedb804fd87c9.zip
(build_scalable_font_name): Round pixel size to the
nearest integer.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/xfaces.c4
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 @@
12005-06-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * macterm.c (mac_to_x_fontname, mac_do_list_fonts): Set XLFD
4 resolution fields for scalable fonts to 0.
5
6 * xfaces.c (build_scalable_font_name): Round pixel size to the
7 nearest integer.
8
12005-06-01 Kim F. Storm <storm@cua.dk> 92005-06-01 Kim F. Storm <storm@cua.dk>
2 10
3 * xdisp.c (display_mode_line): Support nested calls to redisplay 11 * xdisp.c (display_mode_line): Support nested calls to redisplay
@@ -215,8 +223,8 @@
215 (x_scroll_bar_handle_click): Change type of second argument from 223 (x_scroll_bar_handle_click): Change type of second argument from
216 int to ControlPartCode. 224 int to ControlPartCode.
217 (check_alarm): Remove declaration. 225 (check_alarm): Remove declaration.
218 (XTread_Socket) [!TARGET_API_MAC_CARBON]: Don't call it. 226 (XTread_socket) [!TARGET_API_MAC_CARBON]: Don't call it.
219 (XTread_Socket): Use ControlPartCode instead of SInt16. 227 (XTread_socket): Use ControlPartCode instead of SInt16.
220 228
2212005-05-13 Nozomu Ando <nand@mac.com> 2292005-05-13 Nozomu Ando <nand@mac.com>
222 230
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)
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;