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 13:54:04 +0300 Message-ID: <83ilrt5b1v.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31808"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54646@debbugs.gnu.org, visuweshm@gmail.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 01 12:54:55 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 1naEvf-00085T-BZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 12:54:55 +0200 Original-Received: from localhost ([::1]:57330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naEve-0005H8-Ak for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 06:54:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naEuo-0003SQ-3K for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 06:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naEun-0005Ik-QY for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 06:54:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naEun-0005fb-Je for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 06:54:01 -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 10:54: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.164881044021786 (code B ref 54646); Fri, 01 Apr 2022 10:54:01 +0000 Original-Received: (at 54646) by debbugs.gnu.org; 1 Apr 2022 10:54:00 +0000 Original-Received: from localhost ([127.0.0.1]:40991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naEum-0005fK-L2 for submit@debbugs.gnu.org; Fri, 01 Apr 2022 06:54:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naEuk-0005ex-K8 for 54646@debbugs.gnu.org; Fri, 01 Apr 2022 06:53:59 -0400 Original-Received: from [2001:470:142:3::e] (port=36414 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 1naEuf-0005HR-AE; Fri, 01 Apr 2022 06:53:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=5Ke8Ep6VHz4bVELx9VoOW27nAkAgtkdLRAOCCVb0utw=; b=croK1IqkkxLOs4hhxM5/ exlY4ythxcfLRNUP8pPdrYSKaVEDKW0RLl8IefidzkZk5Y1ff5rCvxZhu8ivvYtzNK07ZkIBw9Gup hnmriOtR24v/yZ21cNO7Bt1CjmOmahtU7IwbStRfhoX9F1wVYZ83td0QWFW9dWDsOquo3+HSAKcno 8ACbVIbh0Zp9TzVtLNoJIH2Uxp/gXuKECv9oW/jtcDDdfc3gHIszhYZsaA0EhPGge/JpWMjXQ5/le J512zAxvYpwQlJq+fRmhdyb8dfurWymuMy6CKTh3Gn/ktB3gJdIb5G/Qpy4g1Ut1Gyyb6e2VBNLdw 2inhR4arCn0uWA==; Original-Received: from [87.69.77.57] (port=1278 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 1naEue-00062K-Ia; Fri, 01 Apr 2022 06:53:52 -0400 In-Reply-To: <87wng989ym.fsf@gmail.com> (message from Robert Pluim on Fri, 01 Apr 2022 10:49:21 +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" Xref: news.gmane.io gmane.emacs.bugs:229214 Archived-At: > From: Robert Pluim > Cc: 54646@debbugs.gnu.org,Eli Zaretskii > Date: Fri, 01 Apr 2022 10:49:21 +0200 > > 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 Lucid. I will > Visuwesh> try GTK some time later. > > Iʼve 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 = 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.