From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11860: 24.1; Arabic - Harakat (diacritics, short vowels) don't appear Date: Sun, 19 Aug 2012 21:44:56 +0300 Message-ID: <83pq6md8lz.fsf@gnu.org> References: <878vdbhvc4.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1345401961 21737 80.91.229.3 (19 Aug 2012 18:46:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2012 18:46:01 +0000 (UTC) Cc: 11860@debbugs.gnu.org, smias@yandex.ru To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 19 20:46:00 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1T3AVb-0004nS-DH for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Aug 2012 20:45:59 +0200 Original-Received: from localhost ([::1]:41505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3AVa-0007Cq-5q for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Aug 2012 14:45:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3AVX-0007CV-08 for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2012 14:45:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3AVV-00039X-Pf for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2012 14:45:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3AVV-00039S-MJ for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2012 14:45:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T3AVe-0005fX-9s for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2012 14:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Aug 2012 18:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11860 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11860-submit@debbugs.gnu.org id=B11860.134540192321746 (code B ref 11860); Sun, 19 Aug 2012 18:46:02 +0000 Original-Received: (at 11860) by debbugs.gnu.org; 19 Aug 2012 18:45:23 +0000 Original-Received: from localhost ([127.0.0.1]:38789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T3AV1-0005eg-BM for submit@debbugs.gnu.org; Sun, 19 Aug 2012 14:45:23 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:65313) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T3AUx-0005eW-EI for 11860@debbugs.gnu.org; Sun, 19 Aug 2012 14:45:21 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M9000A00MQVVA00@a-mtaout22.012.net.il> for 11860@debbugs.gnu.org; Sun, 19 Aug 2012 21:44:57 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M9000AIDMQWJ180@a-mtaout22.012.net.il>; Sun, 19 Aug 2012 21:44:57 +0300 (IDT) In-reply-to: <878vdbhvc4.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63298 Archived-At: > From: Kenichi Handa > Cc: 11860@debbugs.gnu.org, smias@yandex.ru, jasonr@gnu.org > Date: Sun, 19 Aug 2012 22:20:27 +0900 >=20 > > If fLogicalOrder is set to FALSE, the function > > generates right-to-left items in reverse order so that ScriptTe= xtOut > > does not have to reverse them before calling ExtTextOut. >=20 > Doesn't it mean that, if fLogicalOrder is TRUE, ScriptPlace > generates xadvance and left/right bearing while expecting > that the glyphs are re-ordered before actually rendered? It could mean that. But it's still only a guess, as the documentatio= n is unclear. > > You can find some details here: >=20 > > http://msdn.microsoft.com/en-us/library/windows/desktop/dd3177= 92%28v=3Dvs.85%29.aspx >=20 > > I hope this will allow you to understand the meaning of the above > > code, by looking at how the results are used in the calls to > > LGLYPH_SET_* macros right below the above snippet. >=20 > Thank you for the pointer. Here are 3 more: http://maxradi.us/documents/uniscribe/ http://www.catch22.net/tuts/uniscribe-mysteries http://www.catch22.net/tuts/more-uniscribe-mysteries > I have questions in the section > "Display Text Using Uniscribe" in that page. The step 2 > says: >=20 > 1. Extract an array of bidirectional embedding levels, > one per range. The embedding level is given by > (SCRIPT_ITEM) si.(SCRIPT_ANALYSIS) a. (SCRIPT_STATE) > s.uBidiLevel. >=20 > From what and how to extract that array? =46rom items[i].a.s.uBidiLevel. I showed an example in an earlier message, where you can see that uBidiLevel is 1 (i.e. RTL). We don't use this information because Emacs reorders characters itself, it doesn't need the UAX#9 implementation contained in Uniscribe. > 2. Pass this array to ScriptLayout to generate a map of > visual positions to logical positions. >=20 > There's no place in Emacs that calls ScriptLayout. Isn't it > a problem? I don't think so, at least not directly. ScriptLayout actually draws the shaped glyphs on the screen. Emacs doesn't use it because it draws the glyphs by itself, using the information in the glyph-string= s generated from the data returned by the shaping engine. Or am I missing something? However, the ScriptLayout issue affects us indirectly because most (all?) other applications do use ScriptLayout, where Emacs draws glyphs by itself. That is why one of the references above explicitly says: pGoffset [...] The application generally doesn=E2=80=99t have to p= ay attention to these offsets at all. They are generated by ScriptPlace and used by ScriptTextOut, and all the application needs to do is keep track of the values in the meantime. The problem is, Emacs does use "all these offsets" and other stuff, and so we are being hit by their insufficient documentation.