help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Displaying SVG content in EWW


From: Pankaj Jangid
Subject: Displaying SVG content in EWW
Date: Fri, 18 Oct 2019 13:07:43 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]