From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Emacs Mac port Date: Thu, 06 Sep 2012 10:35:44 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1346895364 31513 80.91.229.3 (6 Sep 2012 01:36:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Sep 2012 01:36:04 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 06 03:36:05 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9R0g-00085y-Ha for ged-emacs-devel@m.gmane.org; Thu, 06 Sep 2012 03:35:58 +0200 Original-Received: from localhost ([::1]:43019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9R0d-0004cD-Ku for ged-emacs-devel@m.gmane.org; Wed, 05 Sep 2012 21:35:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9R0a-0004c8-Os for emacs-devel@gnu.org; Wed, 05 Sep 2012 21:35:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9R0Z-0003zA-6b for emacs-devel@gnu.org; Wed, 05 Sep 2012 21:35:52 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:64000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9R0Y-0003yl-MI for emacs-devel@gnu.org; Wed, 05 Sep 2012 21:35:51 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id A61F2C055D for ; Thu, 6 Sep 2012 10:35:44 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153083 Archived-At: >>>>> On Mon, 27 Aug 2012 16:40:10 +0900, YAMAMOTO Mitsuharu 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 mituharu@math.s.chiba-u.ac.jp === 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; }