emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs Mac port


From: YAMAMOTO Mitsuharu
Subject: Re: Emacs Mac port
Date: Thu, 06 Sep 2012 10:35:44 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 27 Aug 2012 16:40:10 +0900, YAMAMOTO Mitsuharu <address@hidden> 
>>>>> said:

> The second update of Emacs 24 Mac port 3.x is available from
>     ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-24.2-mac-3.2.tar.gz
> This version is based on Emacs 24.2.

> The third update of Emacs 23 Mac port 2.x is also available from
>     ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-23.4-mac-2.3.tar.gz

I found a bug in text shaping with Arabic text examples given in

  http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-09/msg00076.html

(especially for the Sheen-Kasratan case) and the Arial font setting as

 (set-fontset-font t 'arabic (font-spec :family "arial" :size 30)) .

Please try the following patch if you see strangeness in complex text
layout.

                                     YAMAMOTO Mitsuharu
                                address@hidden

=== modified file 'src/macfont.c'
*** src/macfont.c       2012-08-27 08:21:38 +0000
--- src/macfont.c       2012-09-06 01:16:53 +0000
***************
*** 2419,2431 ****
        to -= j;
        LGLYPH_SET_TO (lglyph, to - 1);
  
!       if (unichars[gl->string_index] >= 0xD800
!         && unichars[gl->string_index] < 0xDC00)
!       LGLYPH_SET_CHAR (lglyph, (((unichars[gl->string_index] - 0xD800) << 10)
!                                 + (unichars[gl->string_index + 1] - 0xDC00)
!                                 + 0x10000));
!       else
!       LGLYPH_SET_CHAR (lglyph, unichars[gl->string_index]);
  
        LGLYPH_SET_CODE (lglyph, gl->glyph_id);
  
--- 2419,2439 ----
        to -= j;
        LGLYPH_SET_TO (lglyph, to - 1);
  
!       /* LGLYPH_CHAR is used in `describe-char' for checking whether
!        the composition is trivial.  */
!       {
!       UTF32Char c;
! 
!       if (unichars[gl->string_index] >= 0xD800
!           && unichars[gl->string_index] < 0xDC00)
!         c = (((unichars[gl->string_index] - 0xD800) << 10)
!              + (unichars[gl->string_index + 1] - 0xDC00) + 0x10000);
!       else
!         c = unichars[gl->string_index];
!       if (macfont_get_glyph_for_character (font, c) != gl->glyph_id)
!         c = 0;
!       LGLYPH_SET_CHAR (lglyph, c);
!       }
  
        LGLYPH_SET_CODE (lglyph, gl->glyph_id);
  
***************
*** 3212,3219 ****
              CTRunGetPositions (ctrun, range, &position);
              gl->advance_delta = position.x - total_advance;
              gl->baseline_delta = position.y;
!             gl->advance = CTRunGetTypographicBounds (ctrun, range,
!                                                      NULL, NULL, NULL);
              total_advance += gl->advance;
            }
  
--- 3220,3228 ----
              CTRunGetPositions (ctrun, range, &position);
              gl->advance_delta = position.x - total_advance;
              gl->baseline_delta = position.y;
!             gl->advance = (gl->advance_delta
!                            + CTRunGetTypographicBounds (ctrun, range,
!                                                         NULL, NULL, NULL));
              total_advance += gl->advance;
            }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]