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#54646: 29.0.50; set-fontset-font and font clipping issues Date: Fri, 01 Apr 2022 15:14:06 +0300 Message-ID: <83bkxl57ch.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="533"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, 54646@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 01 14:15:12 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 1naGBM-000AUY-E2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 14:15:12 +0200 Original-Received: from localhost ([::1]:52944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naGBL-0007AS-0q for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 08:15:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naGBE-0007AJ-Bf for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 08:15:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47165) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naGBC-0003T6-Hp for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 08:15:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naGBC-0004IV-CO for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 08:15: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: Fri, 01 Apr 2022 12:15: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.164881524516426 (code B ref 54646); Fri, 01 Apr 2022 12:15:02 +0000 Original-Received: (at 54646) by debbugs.gnu.org; 1 Apr 2022 12:14:05 +0000 Original-Received: from localhost ([127.0.0.1]:41062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naGAH-0004Gs-BV for submit@debbugs.gnu.org; Fri, 01 Apr 2022 08:14:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naGAF-0004GH-WF for 54646@debbugs.gnu.org; Fri, 01 Apr 2022 08:14:04 -0400 Original-Received: from [2001:470:142:3::e] (port=47044 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naGAA-0003O0-Ps; Fri, 01 Apr 2022 08:13:58 -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=YKYb2QrCLXQhur7pfQeZH3R4r5rAQVVg4EYuM4+yrNw=; b=FIn1PkcESVTn vA9TISzYElMMBj8HAZXBYQNgkVKegEBxqJO7cZQSO8Oi5kcN8MHuvqLdR63BRfpGoQLKV3kCIU7bT GzG1Yb/Djwb9D0mOec+aJ8NOrlvv/v0fDgefK2hRro2nVPld7ao7TLOpL/m39Qml+d6DCeCigXFc9 CvlXkvocEKtBwUgz7BXdGYq+W4ZBxMzzewKho952G7WNjlieomG4s/ybDYf0av5tnH8daUXQLxr7l TC4g8ygw/ag21zbT8n19+05BZxkXYYZKvRlRqjLdYiOYQXJTV2lpsKBDU1TvVPazbusukA0w9nYNE KqDGTZjbIGgU8F5x/GXYjA==; Original-Received: from [87.69.77.57] (port=2272 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naGA5-0003fw-HA; Fri, 01 Apr 2022 08:13:58 -0400 In-Reply-To: <87zgl5hw30.fsf@gmail.com> (message from Visuwesh on Fri, 01 Apr 2022 17:08:59 +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" Xref: news.gmane.io gmane.emacs.bugs:229220 Archived-At: > From: Visuwesh > Cc: Robert Pluim , 54646@debbugs.gnu.org > Date: Fri, 01 Apr 2022 17:08:59 +0530 > > > 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 > > = 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 = lround (pos[i].x_offset * position_unit); > > yoff = - lround (pos[i].y_offset * position_unit); > > wadjust = lround (pos[i].x_advance * position_unit); > > if (xoff || yoff || wadjust != 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. I don't think I understand where to begin the instructions. Are you familiar with running Emacs under GDB and debugging the C code? 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. Alternatively, you could add printf statements in that code which would output those values to stdout or stderr streams.