From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#73752: 29.4; Ligatures are randomly rendered with extra spaces Date: Mon, 28 Oct 2024 09:56:13 +0530 Message-ID: <87jzds3lay.fsf@gmail.com> References: <86zfn9ycis.fsf@gnu.org> <86o735als7.fsf@gnu.org> <87o73534dn.fsf@gmail.com> <86h68x8nuz.fsf@gnu.org> <86ed418niu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39586"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: luangruo@yahoo.com, 73752@debbugs.gnu.org, xuan@xlk.me To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 28 05:27:54 2024 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 1t5HM9-000A6y-Bb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Oct 2024 05:27:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5HLn-0005uc-JX; Mon, 28 Oct 2024 00:27:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5HLj-0005u8-Pu for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 00:27:29 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5HLj-0003hs-Gl for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 00:27:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=x88cFvzDxYul9KgEDam7zgrHupd4U865umx9vQ5SQCo=; b=Qayy0oolo4ceDHzYUQ7cEL0/zdOLJUbmOu9qv8/uuVr23binJ8TYJvTH38DwejUU9hrLhuM4ocnpUzeGXwMIvq5Fnhk77R9pCHFtfyBqUWxVFcx4pOpcTShDl+E3FXc7WmECNbqM1ZpduvXFXLIVFAdLu8avMFnuPoUkjWuXa+gyJmNV7/F5KQq36j2VStg9uqB04HfpR5yBLVWYKWU4LIebOZFdVIWsd9SQdOVxhlq6jCj2028RV+ySvArhRJ+uP4Qp/f3s/HwdQM19+ipHfoTfRyrO15R2iK9cBbtv139PU3DKFsznaWTIdbUZFxXQwcvBUru1OqLgiWicHvB2KQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5HMI-0005Rt-2b for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 00:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Oct 2024 04:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73752 X-GNU-PR-Package: emacs Original-Received: via spool by 73752-submit@debbugs.gnu.org id=B73752.173008967720930 (code B ref 73752); Mon, 28 Oct 2024 04:28:02 +0000 Original-Received: (at 73752) by debbugs.gnu.org; 28 Oct 2024 04:27:57 +0000 Original-Received: from localhost ([127.0.0.1]:50242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5HMC-0005RT-Sg for submit@debbugs.gnu.org; Mon, 28 Oct 2024 00:27:57 -0400 Original-Received: from mail-pg1-f195.google.com ([209.85.215.195]:47146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5HM9-0005RI-Oe for 73752@debbugs.gnu.org; Mon, 28 Oct 2024 00:27:54 -0400 Original-Received: by mail-pg1-f195.google.com with SMTP id 41be03b00d2f7-7ea8de14848so1817173a12.2 for <73752@debbugs.gnu.org>; Sun, 27 Oct 2024 21:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730089577; x=1730694377; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x88cFvzDxYul9KgEDam7zgrHupd4U865umx9vQ5SQCo=; b=FMCBk9fhKz/QOQ4cBS/Fr2RklwzWfhOVVBHfUVlspc0kdK4h+5BGcNE5/CHl7VifTn 1MRtDDPHC1MFFdW4V2JqpxbGQmD04MZGpr9Tjm9JPAdCYOKOsI6HCE5m07DbJfNwdLbO r2qRihP7BtSHS1CLhN8PHvHE70H82NWzNF+sizsIgAdNto+nTx48mf23Tad7Yb+DjCrZ 3iQY8JTQ1dwFYp2L/GYCrdyWwgh7CIal0OUICEpB8YOS5PceVJAzBhfg429YmzDpKIxA AV4nsaPjkoPB+zvp5v7Lqax7CeuVOvnRCT1Rfjp2AksfTeTW9ceiS84Se71negbtU/RQ RuvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730089577; x=1730694377; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=x88cFvzDxYul9KgEDam7zgrHupd4U865umx9vQ5SQCo=; b=pvYJt+yTOpbfUbsFdAL1aRZR4juJ9SXy7gQaIiOuta4EFvV5wIaIbqMdzF61cqYgH9 F7TNN5kvUkgWVFeXBr5pP14RhlYERab8at109ZgXI+Qdq8s3N7ShPBfKoenG9xazZzJs xUeuocleGejcU3lXF5km3DnkmuFqsvq3tfqliztuAUy6H92lBggk7r812pPXEF/FDrop pBtP95uiFnkdaiiNhWdn/WgxQMY3oP7qh392bJT33BBvWjk/sCg8rLGE0Z0HFpZ4KrZk GxAejSVXm/vu3MkS6J/WLtwVZT86YjdgsYJkhtWCE6gvsWqpAc72wgWQOGvSVxxkwJT/ dgiQ== X-Forwarded-Encrypted: i=1; AJvYcCVDP6n5RfjKVHN1K4iLsPESENNZuWsSPkEiwqazvtnEpPufoVROMkB+ersZLFvpnuYnDOuniQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzbkHoJ3c1GLs0gm2SUUyJUeD3rePhe6nzyt3iN08WkW/OtW3QJ PyMyz4Ctio1SE4FwGJBJs+yEtDz5lTV9peSo+e+x1BTUE4aHXGPx X-Google-Smtp-Source: AGHT+IGKHsnvq91rSOsUECt8xoCppGIxAzESWmDgyQshUYtces+txerhRYGFfDFwSMA1cF3GXhckjw== X-Received: by 2002:a05:6a21:e8a:b0:1d9:789:b9bd with SMTP id adf61e73a8af0-1d9a851899fmr9749732637.43.1730089577360; Sun, 27 Oct 2024 21:26:17 -0700 (PDT) Original-Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7205791e58dsm4787237b3a.31.2024.10.27.21.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2024 21:26:16 -0700 (PDT) In-Reply-To: <86ed418niu.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 Oct 2024 19:27:05 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294410 Archived-At: [=E0=AE=9E=E0=AE=BE=E0=AE=AF=E0=AE=BF=E0=AE=B1=E0=AF=81 =E0=AE=85=E0=AE=95= =E0=AF=8D=E0=AE=9F=E0=AF=8B=E0=AE=AA=E0=AE=B0=E0=AF=8D 27, 2024] Eli Zarets= kii wrote: >> Cc: luangruo@yahoo.com, 73752@debbugs.gnu.org, xuan@xlk.me >> Date: Sun, 27 Oct 2024 19:19:48 +0200 >> From: Eli Zaretskii >>=20 >> It's quite clear from the image that the "misaligned" line uses a font >> with a different slant/weight/height value. If that is the reason, I >> guess the problem is with composition caching, but why is that an >> issue in real life? Do real-life Lisp programs modify face font >> attributes so frequently? Real-life Lisp programs certainly do not change face font attributes so often but I believe the script does it so to reproduce the issue quickly. In a regular Emacs session, it is enough for the same text to be shown in different font sizes (as a consequence of using C-x C-+) and font weights to eventually exhibit this misalignment IME. > Or maybe I don't understand the original problem. The bug report says > "extra spaces", but eacg font has its own metrics of the SPC glyph, so > highlighting a line with a given face can affect the metrics of the > whitespace. Why is this surprising? Or what did I miss? I do not understand the technical details but the width of the glyph used to draw it is not the one that should be used for the underlying font (weight, size, etc. included) which leads to this misalignment. To make it more clear, let's say that =3D:=3D is shaped for a font X with a specific weight, size, etc. At a later point in time, the width of the glyph corresponding to X is used to draw =3D:=3D with font Y of same family. This leads to the observed misalignment AFAIU.