SharedSafari-SVG-bug.sagewsOpen in CoCalc
Author: Samuel Lelièvre
Views : 3

Safari SVG bug: horizontal and vertical lines not rendered

In Safari, horizontal and vertical lines in SVG pictures are not rendered.

This WebKit bug was initially also present in Chrome. It is long fixed in Chrome, but persists in Safari 8.

Fixed in recent WebKit; the fix might make it to Safari 9.

Compare viewing this page in Safari and Firefox.

hor, ver, cir = line2d([(1,2),(3,2)]), line2d([(2,1),(2,3)]), circle((2,2),1)
(hor + ver).show(axes=False, figsize=(1,1)) # horizontal line + vertical line, SVG
(hor + ver).show(axes=False, figsize=(1,1), svg=False) # horizontal line + vertical line, PNG
(hor + ver + cir).show(axes=False, figsize=(1,1)) # horizontal line + vertical line + circle, SVG
(hor + ver + cir).show(axes=False, figsize=(1,1), svg=False) # horizontal line + vertical line + circle, PNG