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#49555: 28.0.50; height display property causes text to render with incorrect spacing Date: Wed, 14 Jul 2021 15:55:29 +0300 Message-ID: <83a6mp837i.fsf@gnu.org> References: 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="32301"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49555@debbugs.gnu.org To: Adam Edge Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 14 14:56:13 2021 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 1m3eQv-0008BN-7Q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jul 2021 14:56:13 +0200 Original-Received: from localhost ([::1]:50802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3eQt-0001Pd-Lb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jul 2021 08:56:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3eQk-0001OU-3e for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 08:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3eQj-0005Xk-SD for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 08:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3eQj-0006Jt-Oz for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 08:56: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: Wed, 14 Jul 2021 12:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49555 X-GNU-PR-Package: emacs Original-Received: via spool by 49555-submit@debbugs.gnu.org id=B49555.162626734224257 (code B ref 49555); Wed, 14 Jul 2021 12:56:01 +0000 Original-Received: (at 49555) by debbugs.gnu.org; 14 Jul 2021 12:55:42 +0000 Original-Received: from localhost ([127.0.0.1]:43301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3eQQ-0006JA-3u for submit@debbugs.gnu.org; Wed, 14 Jul 2021 08:55:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3eQL-0006Iq-Fi for 49555@debbugs.gnu.org; Wed, 14 Jul 2021 08:55:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38698) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3eQD-00055f-7s; Wed, 14 Jul 2021 08:55:29 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2293 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 1m3eQC-0005mG-SF; Wed, 14 Jul 2021 08:55:29 -0400 In-Reply-To: (message from Adam Edge on Wed, 14 Jul 2021 01:27:22 +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:209921 Archived-At: > From: Adam Edge > Date: Wed, 14 Jul 2021 01:27:22 +0300 > > I have encountered this bug while using lsp-ui mode. When a text is > propertized with the display property `height', it is then displayed > with the incorrect spacing. To test it, I have used this code: > > (require 'lsp-ui) > (let* ((text "Hello world") >       (propertized (progn (add-face-text-property 0 (length text) > 'lsp-ui-sideline-code-action nil text) >                           text)) >       (overlay (make-overlay 1 1))) >   (overlay-put overlay 'after-string (concat propertized >                                         (propertize propertized 'display > (lsp-ui-sideline--compute-height))))) > > lsp-ui-sideline-code-action can be any face with a font with different > spacing. In my Emacs configuration, it is defined as: > > (font-spec :family "Fira Code" :size 14 :weight 'regular :spacing 100) > > When the two "Hello world"s are displayed next to each other, the one > which is propertized with the "height" property displays wider. In > lsp-ui's case, this causes text to be cut off by the right side of the > Emacs frame as it overflows (since the code actions are displayed as an > overlay on the right side of the frame). I'm a bit confused by the scenario description. Could you perhaps provide a simple self-contained recipe, which would not need any third-party packages like lsp-ui, and could be invoked from "emacs -Q"? It sounds like any references to lsp-ui in your scenario are not really relevant, and just muddy the waters? And what do you mean by "a font with a different spacing"? what is the spacing of the default font in your case? and what is the default font itself? Thanks.