From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41005: problem with rendering Persian text in Emacs 27 Date: Fri, 05 Jun 2020 11:01:42 +0300 Message-ID: <83ftbaaql5.fsf@gnu.org> References: <831rmwc9ke.fsf@gnu.org> <35A46479-A62C-42FF-995B-B295FE3408C0@gnu.org> <08A9D65F-0C9C-4EE2-B3B9-2AA25BFFAD54@gnu.org> <878sh35j6f.fsf@gmail.com> <83y2p3as6c.fsf@gnu.org> <87pnae4nhx.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="76056"; mail-complaints-to="usenet@ciao.gmane.io" Cc: valizadeh.ho@gmail.com, 41005@debbugs.gnu.org, nicholasdrozd@gmail.com To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 05 10:03:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jh7Jo-000JWk-2e for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 10:03:12 +0200 Original-Received: from localhost ([::1]:41380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jh7Jm-0007Au-JQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 04:03:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jh7Je-0007AY-PF for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 04:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jh7Je-0001yX-GS for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 04:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jh7Je-0001uh-D5 for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 04:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jun 2020 08:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41005 X-GNU-PR-Package: emacs Original-Received: via spool by 41005-submit@debbugs.gnu.org id=B41005.15913441227283 (code B ref 41005); Fri, 05 Jun 2020 08:03:02 +0000 Original-Received: (at 41005) by debbugs.gnu.org; 5 Jun 2020 08:02:02 +0000 Original-Received: from localhost ([127.0.0.1]:48179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jh7Ig-0001tE-3N for submit@debbugs.gnu.org; Fri, 05 Jun 2020 04:02:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jh7Ie-0001su-3v for 41005@debbugs.gnu.org; Fri, 05 Jun 2020 04:02:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48371) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jh7IX-0001g4-PN; Fri, 05 Jun 2020 04:01:53 -0400 Original-Received: from [176.228.60.248] (port=4977 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jh7IX-0000t6-2e; Fri, 05 Jun 2020 04:01:53 -0400 In-Reply-To: <87pnae4nhx.fsf@gmail.com> (message from Pip Cet on Thu, 04 Jun 2020 19:52:42 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:181537 Archived-At: > From: Pip Cet > Cc: valizadeh.ho@gmail.com, 41005@debbugs.gnu.org, nicholasdrozd@gmail.com > Date: Thu, 04 Jun 2020 19:52:42 +0000 > > > As for script and language, for now adding them would just waste > > memory, since we don't yet have any meaningful support for > > buffer-local, let-alone paragraph-local, scripts and languages. When > > we added HarfBuzz support, I considered adding some functionality to > > determine language and/or script from the codepoints, but decided that > > it made little sense, since HarfBuzz already does exactly that in > > hb_buffer_guess_segment_properties. So I think we should add to the > > FIXME in hbfont.c the fact that when we do support those internally in > > Emacs, we should add these attributes to cached gstrings, but not yet > > actually add them for now. > > We're going to have to change the lgstring structure, though, right? I think so. We should probably add one more element to the vector in LGSTRING_HEADER, because the header is the hash key of the composition cache. > Could we maybe get away with just doing so once? My suggestion would be > to add a single field to gstrings which would currently be L2R or R2L > but might become an alist or something when we get around to adding > those features? We could add an element that would currently be a symbol or an integer, but could later become a vector of several elements. Is that what you had in mind? (I think we should prefer vectors to lists in this case, because consing them is slightly faster, and the number of elements is known in advance and fixed.) > > Here's the patch I propose for emacs-27: > > Let's try that. Pushed to the emacs-27 branch.