factor out svg_restart() to be run when use_svg