From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#52599: 29.0.50; Unproportional Unicode character scale in SVG overlay Date: Mon, 20 Dec 2021 16:31:14 +0000 Message-ID: References: <83h7b6azlm.fsf@gnu.org> <1f8f80c2574cc3c514575683152ef689c4295582.camel@gmail.com> <83ee6aaxf1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12616"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52599@debbugs.gnu.org, "Matsievskiy S.V." To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 20 18:48:12 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 1mzMlf-00034I-Gq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 18:48:11 +0100 Original-Received: from localhost ([::1]:56190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzMld-00024b-Uw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 12:48:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzLZz-0004k5-KM for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 11:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39689) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzLZy-0004r8-Ij for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 11:32:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzLZy-0005Jx-7i for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 11:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Dec 2021 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 52599-submit@debbugs.gnu.org id=B52599.164001789720415 (code B ref 52599); Mon, 20 Dec 2021 16:32:02 +0000 Original-Received: (at 52599) by debbugs.gnu.org; 20 Dec 2021 16:31:37 +0000 Original-Received: from localhost ([127.0.0.1]:51235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzLZY-0005JC-SX for submit@debbugs.gnu.org; Mon, 20 Dec 2021 11:31:37 -0500 Original-Received: from outbound.soverin.net ([116.202.126.228]:49907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzLZV-0005Iv-4G for 52599@debbugs.gnu.org; Mon, 20 Dec 2021 11:31:35 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 6BC49822; Mon, 20 Dec 2021 16:31:26 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1640017885; bh=nEJeoP97+jrz0vMbcKRlMA12DtM+4SlA7oe9y9aU42w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AkVgLLsh2t9q773YhagRetEdQJQKAwsy5QcEMki2IadYVwQI2KHPABTLx2LySvDri /jwIgiE+omJtcCMhIdXIOWitKUGAKqZfg9H0NrPashqg2X+rIASWqJItrHzGADBS2A +yFOtY+87It0qZVeukQfwk21pQsW6JDHScRCWL6L0JKW2Tz11+jHaaNPfKjaYllm2v YZ/Kzv+jd78icJdWo+/b9K533Vim+TQ7Ff1CKvYjErek1easeGABz9vRGhY1epgV+y k53i95K6sM1i7nLs7pMfpaj7CbwF/EedPGrThyTE+Vmu1yYLAfJp5dtWvNeflbsV+5 Ajrwrx+RdKseA== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1mzLZC-001JlC-9l; Mon, 20 Dec 2021 16:31:14 +0000 Mail-Followup-To: Alan Third , Eli Zaretskii , "Matsievskiy S.V." , 52599@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <83ee6aaxf1.fsf@gnu.org> 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:222785 Archived-At: On Sat, Dec 18, 2021 at 02:51:30PM +0200, Eli Zaretskii wrote: > > From: "Matsievskiy S.V." > > Cc: 52599@debbugs.gnu.org > > Date: Sat, 18 Dec 2021 15:13:15 +0300 > > > > Attaching ELisp code > > Thanks. > > In my testing, the size of the font in the image doesn't change at all > when I increase or decrease the text scale in the buffer. > > I think whether the font changes is up to librsvg and the font backend > it uses, and Emacs does not necessarily have a way of controlling > that. But I'm not an expert on SVG and the library, so perhaps > someone else could chime in. I *think* what's going on here is that the image size is defined in terms of "ex", but when using librsvg < 2.52 we have no idea what the ex height should be, so we use a fall-back mechanism to calculate the image size. Additionally most of the text is vector paths, not text, so it doesn't scale with the font size change, but some of it *is* text, so it *does* scale. So what we end up with is that the text scales directly according to the font size and the paths scale according to whatever nonsense librsvg returns for the image size. You could work around this by hard-coding the font size in the SVG or pass in some CSS to over-ride Emacs's default. I'd suggest hard-coding it in the image if possible as the default CSS contains colour information too. (Or we could try and work out the real ex height, but we would probably have to copy how librsvg calculates ex height, which I have a suspicion will be some constant fraction of an em instead of the font's real ex height.) -- Alan Third