unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Howard Melman <hmelman@gmail.com>
Cc: 55322@debbugs.gnu.org
Subject: bug#55322: 28.1; :base-uri not working for svg images on mac
Date: Mon, 9 May 2022 22:42:00 +0100	[thread overview]
Message-ID: <YnmKqLztFKpurYMz@idiocy.org> (raw)
In-Reply-To: <FEB74C04-3C13-4684-B35C-F091FCB48D30@gmail.com>

On Sun, May 08, 2022 at 03:16:02PM -0400, Howard Melman wrote:
> 6 7 (display (image :width 256 :height 256 :type svg :base-uri "/Users/hmelman/.emacs.d/var/osm/default/9-255-170.png" :data "<svg width='256' height='256' version='1.1'
> xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
> <image xlink:href='9-255-170.png' height='256' width='256'/>
> <g fill='#08f' stroke='#028' stroke-width='9' transform='translate(209 64) scale(0.09) translate(-256 -512)'>
> <path d='M256 0C167.641 0 96 71.625 96 160c0 24.75 5.625 48.219 15.672
> 69.125C112.234 230.313 256 512 256 512l142.594-279.375
> C409.719 210.844 416 186.156 416 160C416 71.625 344.375
> 0 256 0z M256 256c-53.016 0-96-43-96-96s42.984-96 96-96
> c53 0 96 43 96 96S309 256 256 256z'/>
> </g></svg>"

The above image should be able to be replicated with something like
this below:

(insert-image (create-image "<svg width='256' height='256' version='1.1'                      
xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<image xlink:href='9-255-170.png' height='256' width='256'/>
<g fill='#08f' stroke='#028' stroke-width='9'
 transform='translate(209 64) scale(0.09) translate(-256 -512)'>
<path d='M256 0C167.641 0 96 71.625 96 160c0 24.75 5.625 48.219 15.672
 69.125C112.234 230.313 256 512 256 512l142.594-279.375
 C409.719 210.844 416 186.156 416 160C416 71.625 344.375
 0 256 0z M256 256c-53.016 0-96-43-96-96s42.984-96 96-96
 c53 0 96 43 96 96S309 256 256 256z'/></g></svg>"
                            'svg t :width 256 :height 256
:base-uri "/Users/hmelman/.emacs.d/var/osm/default/9-255-170.png"))

Try messing with the base-uri, perhaps try setting it to the
directory, or to foo.svg or something.

My first guess would be that if it's working on GNU/Linux but not
macOS is that there might be a difference in the version of librsvg.
The way Emacs handles SVG files on both is pretty much identical
afaik, so any difference is likely to be down to librsvg.

-- 
Alan Third





  parent reply	other threads:[~2022-05-09 21:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <FEB74C04-3C13-4684-B35C-F091FCB48D30@gmail.com>
2022-05-09  3:32 ` bug#55322: 28.1; :base-uri not working for svg images on mac Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-09 14:26   ` Howard Melman
2022-05-09 21:42 ` Alan Third [this message]
2022-05-10  1:43   ` Howard Melman
2022-05-10 17:17     ` Alan Third
2022-05-10 18:01       ` Alan Third
2022-05-11  0:00         ` Howard Melman
2022-05-11  0:17       ` Howard Melman
2022-05-11 16:59         ` Alan Third

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=YnmKqLztFKpurYMz@idiocy.org \
    --to=alan@idiocy.org \
    --cc=55322@debbugs.gnu.org \
    --cc=hmelman@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).