1 | diff -pr ../emacs-23.3/src/nsfont.m src/nsfont.m |
---|
2 | *** ../emacs-23.3/src/nsfont.m 2011-01-09 02:45:14.000000000 +0900 |
---|
3 | --- src/nsfont.m 2011-03-21 17:11:01.000000000 +0900 |
---|
4 | *************** nsfont_open (FRAME_PTR f, Lisp_Object fo |
---|
5 | *** 846,853 **** |
---|
6 | lrint (hshrink * [sfont ascender] + expand * hd/2); |
---|
7 | /* [sfont descender] is usually negative. Use floor to avoid |
---|
8 | clipping descenders. */ |
---|
9 | ! font_info->max_bounds.descent = |
---|
10 | ! -lrint (floor(hshrink* [sfont descender] - expand*hd/2)); |
---|
11 | font_info->height = |
---|
12 | font_info->max_bounds.ascent + font_info->max_bounds.descent; |
---|
13 | font_info->max_bounds.width = lrint (font_info->width); |
---|
14 | --- 846,861 ---- |
---|
15 | lrint (hshrink * [sfont ascender] + expand * hd/2); |
---|
16 | /* [sfont descender] is usually negative. Use floor to avoid |
---|
17 | clipping descenders. */ |
---|
18 | ! if ([sfont mostCompatibleStringEncoding] == 0x80000001) { |
---|
19 | ! /* If the font is Japanese (Mac OS) encoding, change descender to 2 times. |
---|
20 | ! Because most of Japanese font's decender, such as Hiragino, is |
---|
21 | ! too short. */ |
---|
22 | ! font_info->max_bounds.descent = |
---|
23 | ! -lrint (floor(hshrink* [sfont descender] * 2 - expand*hd/2)); |
---|
24 | ! } else { |
---|
25 | ! font_info->max_bounds.descent = |
---|
26 | ! -lrint (floor(hshrink* [sfont descender] - expand*hd/2)); |
---|
27 | ! } |
---|
28 | font_info->height = |
---|
29 | font_info->max_bounds.ascent + font_info->max_bounds.descent; |
---|
30 | font_info->max_bounds.width = lrint (font_info->width); |
---|