macports / aqua / emacs-app / files / patch-macemacsjp-jpfont.diff

diff -pr ../emacs-23.3/src/nsfont.m src/nsfont.m
*** ../emacs-23.3/src/nsfont.m	2011-01-09 02:45:14.000000000 +0900
--- src/nsfont.m	2011-03-21 17:11:01.000000000 +0900
*************** nsfont_open (FRAME_PTR f, Lisp_Object fo
*** 846,853 ****
        lrint (hshrink * [sfont ascender] + expand * hd/2);
      /* [sfont descender] is usually negative.  Use floor to avoid
         clipping descenders. */
!     font_info->max_bounds.descent =
!       -lrint (floor(hshrink* [sfont descender] - expand*hd/2));
      font_info->height =
        font_info->max_bounds.ascent + font_info->max_bounds.descent;
      font_info->max_bounds.width = lrint (font_info->width);
--- 846,861 ----
        lrint (hshrink * [sfont ascender] + expand * hd/2);
      /* [sfont descender] is usually negative.  Use floor to avoid
         clipping descenders. */
!     if ([sfont mostCompatibleStringEncoding] == 0x80000001) {
!       /* If the font is Japanese (Mac OS) encoding, change descender to 2 times.
!          Because most of Japanese font's decender, such as Hiragino, is 
!          too short. */
!       font_info->max_bounds.descent = 
!         -lrint (floor(hshrink* [sfont descender] * 2 - expand*hd/2));
!     } else {
!       font_info->max_bounds.descent = 
!         -lrint (floor(hshrink* [sfont descender] - expand*hd/2));
!     }
      font_info->height =
        font_info->max_bounds.ascent + font_info->max_bounds.descent;
      font_info->max_bounds.width = lrint (font_info->width);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.