1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-03 04:21:28 -08:00

(build_scalable_font_name): Round pixel size to the

nearest integer.
This commit is contained in:
YAMAMOTO Mitsuharu 2005-06-01 08:21:48 +00:00
parent b0241f69c9
commit 02a6375c0e
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2005-06-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* 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 <storm@cua.dk>
* 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 <nand@mac.com>

View file

@ -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;