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#54646: 29.0.50; set-fontset-font and font clipping issues Date: Fri, 01 Apr 2022 17:08:59 +0530 Message-ID: <87zgl5hw30.fsf@gmail.com> References: <875ynuokqt.fsf@gmail.com> <83r16i7kim.fsf@gnu.org> <871qyiob70.fsf@gmail.com> <83lewq7g1j.fsf@gnu.org> <87czi27bnu.fsf@gmail.com> <83h77e7as6.fsf@gnu.org> <874k3e79mc.fsf@gmail.com> <83fsmy793g.fsf@gnu.org> <87v8vu5j9k.fsf@gmail.com> <837d8a6wm7.fsf@gnu.org> <87lewqjh41.fsf@gmail.com> <83wnga5ap3.fsf@gnu.org> <87a6d69g46.fsf@gmail.com> <87h77dk3zn.fsf@gmail.com> <87a6d5jyat.fsf@gmail.com> <87wng989ym.fsf@gmail.com> <83ilrt5b1v.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="28741"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Robert Pluim , 54646@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 01 13:42:28 2022 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 1naFff-0007I9-5h for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 13:42:27 +0200 Original-Received: from localhost ([::1]:36762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naFfd-0001Nj-Ux for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 07:42:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naFdK-0000p0-Pm for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 07:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47129) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naFdK-0005t0-Bx for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 07:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naFdK-0001D5-0e for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 07:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Apr 2022 11:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54646 X-GNU-PR-Package: emacs Original-Received: via spool by 54646-submit@debbugs.gnu.org id=B54646.16488131494582 (code B ref 54646); Fri, 01 Apr 2022 11:40:01 +0000 Original-Received: (at 54646) by debbugs.gnu.org; 1 Apr 2022 11:39:09 +0000 Original-Received: from localhost ([127.0.0.1]:41026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naFcT-0001Bp-G0 for submit@debbugs.gnu.org; Fri, 01 Apr 2022 07:39:09 -0400 Original-Received: from mail-pl1-f193.google.com ([209.85.214.193]:39475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naFcR-0001BV-Bv for 54646@debbugs.gnu.org; Fri, 01 Apr 2022 07:39:07 -0400 Original-Received: by mail-pl1-f193.google.com with SMTP id f10so2246561plr.6 for <54646@debbugs.gnu.org>; Fri, 01 Apr 2022 04:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=0YZry5CdGeZo0lj1uPXXHP7Ggtet3t7QrxwS/fL0AMU=; b=MBrb6HHIlo4MHMa9Jr+D1W5PmWKf2q/Zi4Y+f3J3JKCGD8fhFanzlyHKw+r9DFRMfm Eig5aN/Yc8//3vvV4CLX+yKEQXc/JFXiMLAXQ/9bwFmLHHfwbK5Rin6KTFvnABeIoB9F Ccva0QRIrT4qSta/ONJOroV6tpBzNQYvsuQ/2imJOPtFT4pXcuHssdK4ayUy1WVNpplk O3poDPWGclQeCvEBVbOYZdZL281wP68UAQkL1fmLkTbJcWvM3Q0L3N8xsAnd1uuP52cF FrjeCFwDuUWoVk96Z7MirnuJmcHUkz4Xvee3Jkqk1wxZk99kbhxGBu55x5GldwXvXWaw P9pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=0YZry5CdGeZo0lj1uPXXHP7Ggtet3t7QrxwS/fL0AMU=; b=PoiUmkAti2fuHsjidLT+7D5Sp/QelMyoyb0WFCcRi7tA6ppFMF2g+ITodQX1J8qmdc 2W+0RnYGcfqaFVTisbUctsMMGxV64ufaWb3jkk/S3pmJ1j9hrn3p/8IGzjIHdmgTjxG+ n0SY2tg6ZqHyv8yo6Jud5BnLZ/TdqM2d89OHzLUPoA3WwNHwZ24IWqT/ZZKqL5r6KIAU joJDkC0KnZF4Asn/Ap6FUQrZkxGgf4tdZ1qrzwWDId9CXucABvpPSh9JdWCx3dJmYbFh AvBWVU1zrj9mtUeKOudTxLA95v03te697wyC2+ORROVR0WjV+u4fiI95E2PddFHFJUNB k2nA== X-Gm-Message-State: AOAM5314KaYrRX/TKKx1RLtk8I0V9Pks0zkWPZECeRXkwPtLZdSfXapx JarycTZztX081FqL/oY9Qjk= X-Google-Smtp-Source: ABdhPJxmr8GgTawU7f6c3DzL1SCIa+no4xZhjVFDj/HOktgmGzbfu4Pclq7v98iyep2wJP7/PZnHVQ== X-Received: by 2002:a17:903:120c:b0:154:c135:60d3 with SMTP id l12-20020a170903120c00b00154c13560d3mr10127395plh.48.1648813141439; Fri, 01 Apr 2022 04:39:01 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id t10-20020a056a00138a00b004fa9c9fda44sm2759802pfg.89.2022.04.01.04.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 04:39:01 -0700 (PDT) In-Reply-To: <83ilrt5b1v.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 01 Apr 2022 13:54:04 +0300") 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:229217 Archived-At: [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=8F=E0=AE=AA= =E0=AF=8D=E0=AE=B0=E0=AE=B2=E0=AF=8D 01, 2022] Eli Zaretskii wrote: >> From: Robert Pluim >> Cc: 54646@debbugs.gnu.org,Eli Zaretskii >> Date: Fri, 01 Apr 2022 10:49:21 +0200 >>=20 >> Visuwesh> I can reproduce it in HarfBuzz 4.2.0. Maybe this could be= related to >> Visuwesh> the toolkit being used? I have only tested so far with Lu= cid. I will >> Visuwesh> try GTK some time later. >>=20 >> I=CA=BCve managed to reproduce this, but only once, with HarfBuzz 4.2.0 >> using lucid and Kurinto Seri. I guess that points more at HarfBuzz >> than at Emacs, but maybe the lucid build is doing things slightly >> differently to gtk. > > I think at this point we need to establish whether we pass the same > information to HarfBuzz in the "good" and the "bad" cases. In > particular, we tell it how to scale the glyph metrics: > > hb_font_t *hb_font > =3D font->driver->begin_hb_font > ? font->driver->begin_hb_font (font, &position_unit) > : NULL; > > The value of position_unit then affects the values returned in the > Lisp glyph object used to display the grapheme cluster: > > xoff =3D lround (pos[i].x_offset * position_unit); > yoff =3D - lround (pos[i].y_offset * position_unit); > wadjust =3D lround (pos[i].x_advance * position_unit); > if (xoff || yoff || wadjust !=3D metrics.width) > LGLYPH_SET_ADJUSTMENT (lglyph, CALLN (Fvector, > make_fixnum (xoff), > make_fixnum (yoff), > make_fixnum (wadjust))); > > I'd be interested in what happens there in the "good" vs the "bad" > cases. > > If we pass the same information to HarfBuzz, and it returns different > results, then it's probably a problem in HarfBuzz. If you can give some instructions on how to get started, I can try getting the value of position_unit in the good and the bad cases.