From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73752: 29.4; Ligatures are randomly rendered with extra spaces Date: Mon, 28 Oct 2024 16:59:18 +0200 Message-ID: <86iktc6zp5.fsf@gnu.org> References: <86zfn9ycis.fsf@gnu.org> <86o735als7.fsf@gnu.org> <87o73534dn.fsf@gmail.com> <86h68x8nuz.fsf@gnu.org> <86ed418niu.fsf@gnu.org> <87jzds3lay.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20018"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 73752@debbugs.gnu.org, xuan@xlk.me To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 28 16:00:46 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 1t5REc-00053t-Fb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Oct 2024 16:00:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5REL-0003hs-IL; Mon, 28 Oct 2024 11:00:29 -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 1t5REJ-0003ha-7W for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 11:00:27 -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 1t5REH-00072e-VW for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 11:00:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=IPMB6t12u5NwcCGEZCygOlaNPs9WFm2jTjSxGXE08S0=; b=DRWfFn2YfY6sPTGXTjKhcQx/w0/kPhFqNRi1OjIbG3Nm+t4vQl4y8VEsq5Bum08hSQ1uUHCuaJisigGJ56k6gHXccWRDoGhX+mGTnaYiDNM1oO/JGXbhx69HLuVmWXn0kGV3w1/vFiNsRyGkSESvWUW2Rwjk8SPmKPODkgUt0cky+jZBNblqcFy7tH+lb45wGltS5gvZWhUGODSvFHVyR2/p958EziB1Ot9JfCpcWu45E2+rW5QQMHUOqJpZmd/LeyXyiKm5P8rMVZu12adByZmQTOOmh0aWLSRc5YcVuBZyBTwCluT+wcBJJpyIMs6KQO3CtTuyNU93qljJukJfBQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5REs-0004md-4S for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 11:01: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: Mon, 28 Oct 2024 15:01: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.173012760717876 (code B ref 73752); Mon, 28 Oct 2024 15:01:02 +0000 Original-Received: (at 73752) by debbugs.gnu.org; 28 Oct 2024 15:00:07 +0000 Original-Received: from localhost ([127.0.0.1]:54355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5RDy-0004eF-Sv for submit@debbugs.gnu.org; Mon, 28 Oct 2024 11:00:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5RDx-0004dG-FF for 73752@debbugs.gnu.org; Mon, 28 Oct 2024 11:00:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5RDH-0006mF-KK; Mon, 28 Oct 2024 10:59:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=IPMB6t12u5NwcCGEZCygOlaNPs9WFm2jTjSxGXE08S0=; b=ouAGYxpUJDzw LouwSaLnUsTNQbaKim2Sip6X53YF4QiFstuCCdZastV7grZP8GZ6mQOyTZGg1Npr4C8jaOnUzWyH6 C1Llykei10FtOrLCAUnigZaIiEMeW4XdEu9mkR35yMjmhy1J1yzQTOe5LciQsKEXLdZ1+Znu79ANo 9dHxK99rY1a87Y4zAOR7dgBqHtpXM/4A504y8CrMbTSQ13BroPIj06dCdsT0u/mkOms6Oz7lz7U2y IiTBPM19rk9R4f1vGdK56PvDujvUx2zdURZDIhVbhbDOl0kzhSNLWYAkypid1ook4zZE3hiHUDNjj vhAhNEtO5FlMRebaL0NHCQ==; In-Reply-To: <87jzds3lay.fsf@gmail.com> (message from Visuwesh on Mon, 28 Oct 2024 09:56:13 +0530) 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:294432 Archived-At: > From: Visuwesh > Cc: luangruo@yahoo.com, 73752@debbugs.gnu.org, xuan@xlk.me > Date: Mon, 28 Oct 2024 09:56:13 +0530 > > 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. You need to catch this situation in some reproducible recipe. Because up front I don't understand how is this possible: we cache each composition with its font object, which includes the font size (and also slant, weight, etc.), so a different variant of the same font ought to match only cache entries that use the exact same font. Or maybe I don't understand well enough what composition_gstring_put_cache does to compute the hash of a glyph-string header (which is the hash key for a composition)? > 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. Which seems to indicate that we somehow use a different font's metric. > To make it more clear, let's say that =:= 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 =:= with font Y of same family. > This leads to the observed misalignment AFAIU. But how can this happen? Without a reproducible recipe, which can be reproduced without waiting for too long, it is very hard to investigate this.