From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Khaled Hosny Newsgroups: gmane.emacs.bugs Subject: bug#35721: 27.0.50; Strange Arabic shaping behavior Date: Thu, 16 May 2019 15:45:08 +0200 Message-ID: <20190516134508.GH1802@macbook.localdomain> References: <87h89ycpnw.fsf@tcd.ie> <83mujp9in8.fsf@gnu.org> <83d0kkao99.fsf@gnu.org> <83v9yacyvp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="43220"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.11.4 (2019-03-13) Cc: contovob@tcd.ie, Behdad Esfahbod , 35721@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 16 15:46:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRGi6-000B4v-IE for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 May 2019 15:46:14 +0200 Original-Received: from localhost ([127.0.0.1]:58286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRGi5-0003pl-DR for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 May 2019 09:46:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRGhw-0003pJ-TW for bug-gnu-emacs@gnu.org; Thu, 16 May 2019 09:46:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRGht-00084r-QR for bug-gnu-emacs@gnu.org; Thu, 16 May 2019 09:46:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41290) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRGht-00084k-OC for bug-gnu-emacs@gnu.org; Thu, 16 May 2019 09:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hRGht-00050H-KT for bug-gnu-emacs@gnu.org; Thu, 16 May 2019 09:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Khaled Hosny Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2019 13:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35721 X-GNU-PR-Package: emacs Original-Received: via spool by 35721-submit@debbugs.gnu.org id=B35721.155801432019188 (code B ref 35721); Thu, 16 May 2019 13:46:01 +0000 Original-Received: (at 35721) by debbugs.gnu.org; 16 May 2019 13:45:20 +0000 Original-Received: from localhost ([127.0.0.1]:54834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRGhD-0004zQ-Pn for submit@debbugs.gnu.org; Thu, 16 May 2019 09:45:20 -0400 Original-Received: from mail-wr1-f50.google.com ([209.85.221.50]:41246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRGhC-0004zD-4d for 35721@debbugs.gnu.org; Thu, 16 May 2019 09:45:18 -0400 Original-Received: by mail-wr1-f50.google.com with SMTP id g12so3197878wro.8 for <35721@debbugs.gnu.org>; Thu, 16 May 2019 06:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=h3/agitD84ZrPd2zivfvs65M+X420hfIBv7bBT8t1YY=; b=UhTOpUI6hFkl2BVNGgkRrv7tIDPjfCxtEYSLd6L/UzNrktaQfcGWNLHPF7dlD6dOgR Wh/kNXrSpnZBhn33Izfyc/zU7VUDLV2Ig180btkn23syINdm9ORR9LFK2b2RvPw99QDu +KPQ1EMStep7M6Z+22+vVpZbgeRTqHYufzRUdfJ4k21JMUviUFiES8ahQMLKexX8aw3Q fpBmODledJXkbwS/wO1A+Y1Btq2ZMP91BKBbOQ54ldK4UDP3ogYI1iddMvzrpCPvFyan LMmEGczD3Y4MHxfb+bvbzC7JT9xOPRceDgiJPCPayPhr+jbNpNFjAL3jdpDwcCqKnUr7 tM9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=h3/agitD84ZrPd2zivfvs65M+X420hfIBv7bBT8t1YY=; b=YpMTXx2iCBzeLUs0a7vk63XK2dC0tDvLLgpOY2VwNqS3rDeimlflXc8SthdL2ksXDb WdJtVOjbmxm/jp9igKK20k/cYPys6y57GIvzgG4w349tOIFGpNZeDAJKccy7k/hXWtUK uFcXAUrW/phMEzjb+p4JHQZTxENn9NzVIXxH3fdU1WFvnOKcQ2pUl+PgvnpruTOAD6+p H/cpYKHMyDt0XvWlHOEjO1enU6yT5eAnxS6DAFTcNbeX/WOEtknnBjVPHuIzEL7riodc pPcWTXMSmMwCkux0DNfKyPivwUIbK6fR9wjNp3/uIN2VluL8rbiZe7zNiI7SWK2fGwK9 MhGQ== X-Gm-Message-State: APjAAAX59+JW2cDHpJSYe2xXHgEwXSJcZ8EO5CeIQWvxRR9iLSQzapdG LUzZf2kndQS8m2Y7FPkG/E4= X-Google-Smtp-Source: APXvYqzeMcDRHqY88fwkQGW8YZld2UO5KC8VrvQBdkA89KaDJ6RevHIj1ML/XnoQdMNIj7q5FBDxuA== X-Received: by 2002:adf:d089:: with SMTP id y9mr13457846wrh.239.1558014312157; Thu, 16 May 2019 06:45:12 -0700 (PDT) Original-Received: from macbook.localdomain ([41.237.115.92]) by smtp.gmail.com with ESMTPSA id n63sm5347251wmn.38.2019.05.16.06.45.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 May 2019 06:45:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: <83v9yacyvp.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:159388 Archived-At: On Thu, May 16, 2019 at 04:28:10PM +0300, Eli Zaretskii wrote: > > From: Behdad Esfahbod > > > > Also, if you don't pass neighboring context text to HarfBuzz, again, > > nothing we can do. > > I believe this is about the other part: displaying text which is > partially selected, when selection is shown as a different background > color. You are saying that to do its job, a shaping engine needs to > see the entire text, not just the part which has the same colors. > Right? There are two kinds of formatting changes, that involve a different font and that don’t. For changes that involve a different font (using a new typeface, making text bold or italic etc.) each part of the text on the sides of the change has to be shaped separately, but if enough context is given then HarfBuzz can at least do basic Arabic shaping (selecting the right form for the context). Changes that does not involve a different font like color, underline, background etc. should not break the shaping at all and the text should be shaped together. The formatting information should be kept along the text and be applied after shaping i.e. if characters N to N+5 are red, then after shaping glyphs belonging to characters N to N+5 should be drawn red. Regards, Khaled