unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pankaj Jangid <pankaj.jangid@gmail.com>
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Displaying SVG content in EWW
Date: Fri, 18 Oct 2019 13:07:43 +0530	[thread overview]
Message-ID: <m24l06cxmg.fsf@gmail.com> (raw)

Hi,

Whenever there is <svg> content on a webpage, eww emits the error shown
below. There are two ways I should be getting rid of the error message:

1. Ignore this somewhere in config (I don't know how)
2. Fix it to support SVG rendering (I don't know this either)

Please help me solve this. 2nd approach is preferred if there is a
solution. I am using Emacs 26.3 on MacOS.

Error Message:

 entered--Lisp error: (error "Invalid image type ‘svg’")
  signal(error ("Invalid image type ‘svg’"))
  error("Invalid image type `%s'" svg)
  image-type("<svg width=\"118\" height=\"78\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#848A91\"><path d=\"M34.05 55.73L18.5 43.5h-12L1.25 5.47 67.69.69 52.4 43.5H30.99zM10.5 16.5h45M10.5 25.5h39M10.5 34.5h24M69.16 77.39l-4.7-2.89h-6.12l-2.71-12.23 24.29-2.48-3.23 14.71h-8.83zM61.5 65.5h13M61.5 68.5h10M61.5 71.5h7M80.16 36.07l5.34-4.57h7V19.03l-24.8-3.4 2.8 15.87 10.78.1zM89.5 21.5h-17M89.5 25.5h-15M89.5 28.5h-9M96.84 70.5l10.77-9h6.12l2.89-19.85-39.59-4.57 8.84 25.42h12.57zM111.5 46.5h-27M111.5 52.5h-23M111.5 57.5h-15M43.39 43.49L58.34 61.5M61.74 18.69l8.84 12.57M92.5 25l15.11 15.43M80 59.5l3.15-3.78M52.57 43.49l27.52 3.06\"/></g></svg>" svg t)
  create-image("<svg content...>" svg t :ascent 100)
  shr-put-image(("<svg content...>" image/svg+xml) #(" " 0 1 (keymap (keymap (13 . shr-browse-url) (79 . shr-save-contents) (118 . shr-browse-url) (117 . shr-maybe-probe-and-copy-url) (119 . shr-maybe-probe-and-copy-url) (73 . shr-insert-image) (mouse-2 . shr-browse-url) (follow-link . mouse-face) (27 keymap (9 . shr-previous-link)) (9 . shr-next-link) (122 . shr-zoom-image) (105 . shr-browse-image) (97 . shr-show-alt-text) keymap (111 . image-save) (114 . image-rotate) (43 . image-increase-size) (45 . image-decrease-size)) shr-alt "*" image-url "https://cdn.sstatic.net/Img/home/public-qa.svg?v=d82acaa7df9f" image-displayer (lambda (url start end) (when url (if (string-match "\\`cid:" url) nil (url-retrieve url (quote shr-image-fetched) (list (current-buffer) start end) t t)))) help-echo #("*" 0 1 (shr-indentation nil face variable-pitch)))) (:width nil :height nil))
  ......
  ......
  url-http-activate-callback()
  url-http-content-length-after-change-function(372 1081 709)
  url-http-generic-filter(#<process cdn.sstatic.net> "<svg width=\"118\" height=\"78\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#848A91\"><path d=\"M34.05 55.73L18.5 43.5h-12L1.25 5.47 67.69.69 52.4 43.5H30.99zM10.5 16.5h45M10.5 25.5h39M10.5 34.5h24M69.16 77.39l-4.7-2.89h-6.12l-2.71-12.23 24.29-2.48-3.23 14.71h-8.83zM61.5 65.5h13M61.5 68.5h10M61.5 71.5h7M80.16 36.07l5.34-4.57h7V19.03l-24.8-3.4 2.8 15.87 10.78.1zM89.5 21.5h-17M89.5 25.5h-15M89.5 28.5h-9M96.84 70.5l10.77-9h6.12l2.89-19.85-39.59-4.57 8.84 25.42h12.57zM111.5 46.5h-27M111.5 52.5h-23M111.5 57.5h-15M43.39 43.49L58.34 61.5M61.74 18.69l8.84 12.57M92.5 25l15.11 15.43M80 59.5l3.15-3.78M52.57 43.49l27.52 3.06\"/></g></svg>")

...End of email
--
Regards,
Pankaj Jangid



             reply	other threads:[~2019-10-18  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  7:37 Pankaj Jangid [this message]
2019-10-18  8:09 ` Displaying SVG content in EWW Eli Zaretskii
     [not found]   ` <CAPeGcy-iwLkwPXFqZVtJxVnPjeix=CWKm24BfJ6HFCEOJe3fRA@mail.gmail.com>
2019-10-18 12:31     ` Eli Zaretskii
2019-10-18 13:32       ` Pankaj Jangid
     [not found] ` <mailman.1075.1571384277.9715.help-gnu-emacs@gnu.org>
2019-10-19  8:24   ` Lars Magne Ingebrigtsen
2019-10-19  8:56     ` Pankaj Jangid

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=m24l06cxmg.fsf@gmail.com \
    --to=pankaj.jangid@gmail.com \
    --cc=help-gnu-emacs@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.
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).