all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Matsievskiy S.V." <seregaxvm.main@gmail.com>
To: Alan Third <alan@idiocy.org>, Eli Zaretskii <eliz@gnu.org>
Cc: 52599@debbugs.gnu.org
Subject: bug#52599: 29.0.50; Unproportional Unicode character scale in SVG overlay
Date: Tue, 21 Dec 2021 15:15:44 +0300	[thread overview]
Message-ID: <41de4d3c8393ce6918e6a89437d8f53da8be556d.camel@gmail.com> (raw)
In-Reply-To: <YcCv0nz9VwW5pHyz@idiocy.org>

[-- Attachment #1: Type: text/plain, Size: 2175 bytes --]

> 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. 

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?

-- 
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." <seregaxvm.main@gmail.com>
> > > 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.)
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2021-12-21 12:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-18 11:50 bug#52599: 29.0.50; Unproportional Unicode character scale in SVG overlay Matsievskiy S.V.
2021-12-18 12:04 ` Eli Zaretskii
2021-12-18 12:13   ` Matsievskiy S.V.
2021-12-18 12:51     ` Eli Zaretskii
2021-12-18 14:09       ` Matsievskiy S.V.
2021-12-20 16:31       ` Alan Third
2021-12-21 12:15         ` Matsievskiy S.V. [this message]
2021-12-21 20:55           ` Alan Third
2021-12-22  8:49             ` Matsievskiy S.V.
2022-01-21 13:36             ` Lars Ingebrigtsen
2021-12-19 11:15 ` Lars Ingebrigtsen
2021-12-19 11:55   ` Matsievskiy S.V.
2021-12-19 12:07     ` Lars Ingebrigtsen
2021-12-19 12:11   ` Stephen Berman
2021-12-19 12:13     ` Lars Ingebrigtsen
2021-12-19 14:31       ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41de4d3c8393ce6918e6a89437d8f53da8be556d.camel@gmail.com \
    --to=seregaxvm.main@gmail.com \
    --cc=52599@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.