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 18:40:30 +0530 Message-ID: <87v8vthruh.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> <87zgl5hw30.fsf@gmail.com> <83bkxl57ch.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="9421"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: rpluim@gmail.com, 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 15:11:10 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 1naH3W-0002LE-6d for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 15:11:10 +0200 Original-Received: from localhost ([::1]:55448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naH3U-0008FJ-Qn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 09:11:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naH3O-0008Ew-KC for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 09:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naH3O-0005ID-Ba for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 09:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naH3O-0005mD-6E for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 09:11: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 13:11:02 +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.164881864722166 (code B ref 54646); Fri, 01 Apr 2022 13:11:02 +0000 Original-Received: (at 54646) by debbugs.gnu.org; 1 Apr 2022 13:10:47 +0000 Original-Received: from localhost ([127.0.0.1]:41128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naH38-0005lS-Sb for submit@debbugs.gnu.org; Fri, 01 Apr 2022 09:10:47 -0400 Original-Received: from mail-pj1-f67.google.com ([209.85.216.67]:44727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naH37-0005lD-De for 54646@debbugs.gnu.org; Fri, 01 Apr 2022 09:10:45 -0400 Original-Received: by mail-pj1-f67.google.com with SMTP id h23-20020a17090a051700b001c9c1dd3acbso2476932pjh.3 for <54646@debbugs.gnu.org>; Fri, 01 Apr 2022 06:10:45 -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=kztfn731QThOl1ckyNDVClU+rHxc+QxZb97+0QfYy2M=; b=OyEK3qZqMvFphNZLMcjmkUSjz1Rq4697j9vaufD66WIWzUMYdsOgN84u8LW3+/muPW UDy2nnk7BZL8fvFMtokRhzlvUkzHuSfP+iVo+YEuAZiY/IdQ/vn/HkrH9m8EuGLufRG7 U5GWPkRfQygTtbzZoSqAXO3robgj91MBE752nTXguXLvRB6cu5wCGqkJfJ2WRF2NLap9 kumAlwezdeihCsysySysN4y7ttzo7IdDFQFk7piEZnSmAbTbEr3nQcfZY0xewuyQs+NX PL2f3N6onziSy8vZmruDyef2XhxNb6aCckzmwqmmioFNAlIK9Ahi7FR2TGWI19l5YRom jY8Q== 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=kztfn731QThOl1ckyNDVClU+rHxc+QxZb97+0QfYy2M=; b=fe5YhYTyfZPNCjabxLOk8mqUYnwBNEGbnofaFgK/FwfkHFFb9InQDsXD7dqOE5SVQh uaGyhty7MyNPZ2OLCrUcKIulRnm290a6VewB+qxb38+VJcGSGcI25PvwAK+DqDmReQsB FjjFHQM9/P4SKzyu7sluqfP/ha0s/9amUh8KIzPhLfzE7bSQ0Kx1gb/3tVC7rm3IXUBx W7FVezPgGWIIqnbq+3bh3FgVtbXoCZnrC++5cWinVPPGE/lhuDeBBE/I0kUmuE3JWd9Y iiuqUskNWgaMixUTllgkE7klE5YAou5x6OVg7i+2StY4Xk1l8oYcwC/O4698uw7C2Sb2 3KMQ== X-Gm-Message-State: AOAM532mJrJ/8GbVns6+ykAXTN/a6cBwNlaBQSExRKXghfVG58evTLGG WtBDoo5obON/Uf5ZH/gTdmE= X-Google-Smtp-Source: ABdhPJz1WivZ7bxEsnmF/Sa6RDM0MTOKtSTNFJbOBGolOgRl7h7A5FVfXq6JZPhRmcO50XiIjGtLZw== X-Received: by 2002:a17:902:8d8b:b0:155:f201:16ad with SMTP id v11-20020a1709028d8b00b00155f20116admr10682666plo.150.1648818639417; Fri, 01 Apr 2022 06:10:39 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id pc13-20020a17090b3b8d00b001c775679f58sm13393604pjb.37.2022.04.01.06.10.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 06:10:39 -0700 (PDT) In-Reply-To: <83bkxl57ch.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 01 Apr 2022 15:14:06 +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:229224 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: Visuwesh >> Cc: Robert Pluim , 54646@debbugs.gnu.org >> Date: Fri, 01 Apr 2022 17:08:59 +0530 >>=20 >> > 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. >>=20 >> 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. > > I don't think I understand where to begin the instructions. Are you > familiar with running Emacs under GDB and debugging the C code?=20=20 Unfortunately not, but the printf option sounds feasible. So I will do that. > If so, setting a breakpoint in the code which I quoted (it's in > hbfont.c) and showing the values in both the "good" and the "bad" > cases is what we need. > I get two matches for the first snippet: in hbfont_shape and in hbfont_otf_capability. I assume I have to check the one in hbfont_shape? > Alternatively, you could add printf statements in that code which > would output those values to stdout or stderr streams.