From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bidi,gmane.emacs.devel Subject: Re: Arabic support Date: Wed, 01 Sep 2010 16:08:50 +0900 Message-ID: References: <83bp8oml9c.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283324945 13307 80.91.229.12 (1 Sep 2010 07:09:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Sep 2010 07:09:05 +0000 (UTC) Cc: emacs-bidi@gnu.org, emacs-devel@gnu.org, jasonr@gnu.org To: Eli Zaretskii Original-X-From: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Wed Sep 01 09:09:03 2010 Return-path: Envelope-to: gnu-emacs-bidi@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OqhRP-0004bz-IN for gnu-emacs-bidi@m.gmane.org; Wed, 01 Sep 2010 09:09:03 +0200 Original-Received: from localhost ([127.0.0.1]:60697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqhRO-0005VS-Oo for gnu-emacs-bidi@m.gmane.org; Wed, 01 Sep 2010 03:09:02 -0400 Original-Received: from [140.186.70.92] (port=41775 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqhRK-0005UD-VH for emacs-bidi@gnu.org; Wed, 01 Sep 2010 03:08:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqhRJ-0007zd-QL for emacs-bidi@gnu.org; Wed, 01 Sep 2010 03:08:58 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:51241) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqhRG-0007yg-Oa; Wed, 01 Sep 2010 03:08:55 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id o8178pwd011609; Wed, 1 Sep 2010 16:08:51 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id o8178pN5020677; Wed, 1 Sep 2010 16:08:51 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id o8178pad018237; Wed, 1 Sep 2010 16:08:51 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.71) (envelope-from ) id 1OqhRC-0007sI-Re; Wed, 01 Sep 2010 16:08:50 +0900 In-Reply-To: (message from Eli Zaretskii on Wed, 01 Sep 2010 02:11:24 -0400) X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-BeenThere: emacs-bidi@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of Emacs support for multi-directional text." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Errors-To: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bidi:789 gmane.emacs.devel:129541 Archived-At: In article , Eli Zaretskii writes: > > Doesn't it mean uniscribe_shape reorders glyphs? > This reorders a single LGSTRING, according to my reading. Isn't an > LGSTRING a single grapheme cluster, rather than several distinct > characters? No, LGSTRING may contain multiple grapheme clusters. In the case of arabic, we make LGSTRING for one Arabic word then shape it (otherwise, the shaper can't know where in a word a consonant appears). So, usually LGSTRING contains multiple grapheme clusters for Arabic. Glyphs constituting a grapheme cluster has the same value in LGLYPH_FROM (G) and LGLYPH_TO (G) where G is a LGRYPH given by LGSTRING_GLYPH (LGLYPH, IDX). > Btw, where's the documentation of LGSTRING? The commentary to > uniscribe_shape says to look in font-make-gstring, but I cannot find > that, neither as function nor as variable. In general, everything > about compositions and lgstrings needs a lot more of documentation. I renamed font-make-gstring to composition-get-gstring and moved the code to composite.c. The above macros for accessing LGSTRING and LGLYPH are in composite.h. --- Kenichi Handa handa@m17n.org