From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Matsievskiy S.V." Newsgroups: gmane.emacs.bugs Subject: bug#52599: 29.0.50; Unproportional Unicode character scale in SVG overlay Date: Tue, 21 Dec 2021 15:15:44 +0300 Message-ID: <41de4d3c8393ce6918e6a89437d8f53da8be556d.camel@gmail.com> References: <83h7b6azlm.fsf@gnu.org> <1f8f80c2574cc3c514575683152ef689c4295582.camel@gmail.com> <83ee6aaxf1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-E99AfVzq5tFS72WtcN/9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29114"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.42.2-1 Cc: 52599@debbugs.gnu.org To: Alan Third , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 21 13:16:36 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 1mze4J-0007NI-Rc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Dec 2021 13:16:35 +0100 Original-Received: from localhost ([::1]:47366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mze4I-0004NM-Mc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Dec 2021 07:16:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mze3m-0004N2-TP for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 07:16:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mze3m-0006tT-1K for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 07:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mze3l-00086A-Um for bug-gnu-emacs@gnu.org; Tue, 21 Dec 2021 07:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Matsievskiy S.V." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Dec 2021 12:16:01 +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.164008895531112 (code B ref 52599); Tue, 21 Dec 2021 12:16:01 +0000 Original-Received: (at 52599) by debbugs.gnu.org; 21 Dec 2021 12:15:55 +0000 Original-Received: from localhost ([127.0.0.1]:52624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mze3e-00085k-Nv for submit@debbugs.gnu.org; Tue, 21 Dec 2021 07:15:54 -0500 Original-Received: from mail-lf1-f54.google.com ([209.85.167.54]:36417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mze3d-00085U-6e for 52599@debbugs.gnu.org; Tue, 21 Dec 2021 07:15:54 -0500 Original-Received: by mail-lf1-f54.google.com with SMTP id k37so28939144lfv.3 for <52599@debbugs.gnu.org>; Tue, 21 Dec 2021 04:15:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version; bh=FeKxFB0dhmtPJCN15T6tRY2q1jchIrxS/RVA02wRYfE=; b=CFpbJaHoLRDxuxfH6RFZeQQJ0CyS9ILYO02LjTUVjQnMNm/DViC7Zf967Oxgid/BNQ XUwKePVL9Yq4pOQxSkfY39rTbxGx+5MXOnhyiXh9re7iBHTPImRTcYkyJdUqNmYg1PG2 sYmmMJW9cirRPZdWI4MS6gJg0gCfgF2G7EgwgxWyz/eVmJfc844mDMF1hoa9ua/lvCMT +DARG3pzeviYgtVZroc56EmCUdOxAFXcyqC95BYbE8/bmUiZnRDr2KNaB3Kp5xSmnimU 4nkv7gBZ89GeRF4b9U7DaY6cvNZ7lwUtjxUNFlRv0wXVbq4O7JrlK9b8UERoS95MJWop DUOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version; bh=FeKxFB0dhmtPJCN15T6tRY2q1jchIrxS/RVA02wRYfE=; b=F/EtDEpaC0qQiN2nOnWuddB7E6pVVPW6UU+jK132Bz80oQXEkpHlHUYEr5jPH6xwY1 gZoeTOThC4HUNK1KvfISJZWBuNnX1x/sMYC+s0BvQ2uerj3C6qxiee0zZCqBaS+bvV0Q P7ET+Vww99csitdFrBC29WUPNXqlHvRImqwuuUJafRUeNF9c0OWrF3Iid1R2jOy8noAl GTJDJTLOJlBR1l7WtrDmJ9GurvqF4iPoE8rCG5b4hu2QOqrVHxqPgv2sA9Tn7nNJzWX+ hf0BB1M1glj8FWCYGkFKnAbjyM/AlAUr3e5Qvw4ZCLt2Z9mji1QqVAPrkOLbYUNgq5K6 f7ig== X-Gm-Message-State: AOAM533XUrl4fa9Zm9GezWW/H0xGq7KTLvetjNr8QQIAMA22D+FQKRml d+FE0QkUAqIS+xOgoeFwFEY2knlk4dQ= X-Google-Smtp-Source: ABdhPJx/Fn5DwccrefN/mafoMhzue+QZtiUTTIBomDkvmab0D46Xkiek9UdjSzq0jgVMe7ApeExkYw== X-Received: by 2002:a05:6512:ea2:: with SMTP id bi34mr2883404lfb.12.1640088947168; Tue, 21 Dec 2021 04:15:47 -0800 (PST) Original-Received: from [192.168.0.2] ([46.188.27.171]) by smtp.gmail.com with ESMTPSA id d3sm312751lfs.204.2021.12.21.04.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 04:15:46 -0800 (PST) In-Reply-To: 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:222873 Archived-At: --=-E99AfVzq5tFS72WtcN/9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > 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.=20 Aren't these characters associated with the svg overlay? If so, it should be possible to apply image scaling rules to them, or is it too much work? --=20 Best regards, Sergey Matsievskiy On Mon, 2021-12-20 at 16:31 +0000, Alan Third wrote: > 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 > > >=20 > > > Attaching ELisp code > >=20 > > Thanks. > >=20 > > 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. > >=20 > > 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.=C2=A0 But I'm not an expert on SVG and the library, so perhaps > > someone else could chime in. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > (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.) >=20 --=-E99AfVzq5tFS72WtcN/9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEF2eqspcKUNK7HAMqJ3MPanxtP2sFAmHBxXAACgkQJ3MPanxt P2vvWgwAne1YId3k6J3olGo2VgJf29yZYN929bieu+eOyxEOSueTFIujaMePyOmc YUioFm0R+IGWI5jzx/Ju1VoJB6gMa0oX0VN1/XZHPWsYr+KkNqb/Rv63SzGpS5xp xJTuduQe5OIsiWi7BNrU6VtEoWd1i0ZeqSlGiz8nLkrZo5u/jEtWSlXhrYWGCNKS 7i9vIXMVHuaiyZHFRsZzkxLN9pxvY4xJVNpiVzlchYktVkRzW+x5Z7g9FsuJtHWR zrxqBR/W6WsHf13Vim1ShEWjdnsrh5JyX7nywn7ePlKW096IiC7zvA/Ktf0GJlm+ 2tJxm6sD6lTIxjFVlz8AddrS99ePpU3Vvk6H06P+gqfuNH8omz069YvYbr0UZK9i 4ftt8U2a6pL+JcocMrUDUxo9M4b4CclzGH1bCoj5hpbWJgtityiVJoVJqHI6OFV4 EcnblRjTb4hJ2gPv5vSsDYitp+m29NArUoyI+wvjhc/ozJmwqrE4iub3bw+hgQVl Kc+K460m =5VAt -----END PGP SIGNATURE----- --=-E99AfVzq5tFS72WtcN/9--