{"id":633,"date":"2009-12-09T18:00:06","date_gmt":"2009-12-09T23:00:06","guid":{"rendered":"http:\/\/poojanwagh.opalstacked.com\/poojanblog\/2009\/12\/weird-chrome-svg-bug\/"},"modified":"2009-12-09T18:00:06","modified_gmt":"2009-12-09T23:00:06","slug":"weird-chrome-svg-bug","status":"publish","type":"post","link":"https:\/\/poojanblog.com\/blog\/2009\/12\/weird-chrome-svg-bug\/","title":{"rendered":"Weird Chrome SVG bug"},"content":{"rendered":"<p>Google Chrome seems to have a bug in its rendering of SVG files. Here&rsquo;s what it looks like:<\/p>\n<p><a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2009\/12\/ChromeSVG.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"Chrome SVG\" border=\"0\" alt=\"Chrome SVG\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2009\/12\/ChromeSVG_thumb.png\" width=\"244\" height=\"74\" \/><\/a> <\/p>\n<p>Here&rsquo;s what the same files look like under Firefox:<\/p>\n<p><a href=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2009\/12\/FirefoxSVG.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"Firefox SVG\" border=\"0\" alt=\"Firefox SVG\" src=\"http:\/\/poojanblog.com\/poojanblog\/wp-content\/uploads\/2009\/12\/FirefoxSVG_thumb.png\" width=\"244\" height=\"70\" \/><\/a> <\/p>\n<p>The HTML file I used to test this is:<\/p>\n<div><!--\n\nCode highlighting produced by Actipro CodeHighlighter (freeware)\nhttp:\/\/www.CodeHighlighter.com\/\n\n--><span style=\"color: #0000ff\">&lt;<\/span><span style=\"color: #800000\">html<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/div>\n<div><span style=\"color: #0000ff\"><\/span><span style=\"color: #0000ff\">&#160; &lt;<\/span><span style=\"color: #800000\">head<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/div>\n<div><span style=\"color: #0000ff\">&#160;&#160;&#160; <\/span><span style=\"color: #0000ff\">&lt;<\/span><span style=\"color: #800000\">title<\/span><span style=\"color: #0000ff\">&gt;<\/span><span style=\"color: #000000\">Test<\/span><span style=\"color: #0000ff\">&lt;\/<\/span><span style=\"color: #800000\">title<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/div>\n<div><span style=\"color: #0000ff\">&#160; <\/span><span style=\"color: #0000ff\">&lt;\/<\/span><span style=\"color: #800000\">head<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/div>\n<div><span style=\"color: #0000ff\">&#160; <\/span><span style=\"color: #0000ff\">&lt;<\/span><span style=\"color: #800000\">body<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/div>\n<div><span style=\"color: #0000ff\">&#160;&#160;&#160; <\/span><span style=\"color: #0000ff\">&lt;<\/span><span style=\"color: #800000\">p<\/span><span style=\"color: #0000ff\">&gt;<\/span><span style=\"color: #000000\">The received in-phase is <\/span><span style=\"color: #0000ff\">&lt;<\/span><span style=\"color: #800000\">object <\/span><span style=\"color: #ff0000\">type<\/span><span style=\"color: #0000ff\">=&quot;image\/svg+xml&quot;<\/span><span style=\"color: #ff0000\"> data<\/span><span style=\"color: #0000ff\">=&quot;665dd30fd32270d75e7871a23e9ae2b3.svg&quot;<\/span><span style=\"color: #0000ff\">&gt;&lt;\/<\/span><span style=\"color: #800000\">object<\/span><span style=\"color: #0000ff\">&gt;<\/span><span style=\"color: #000000\">and the quadrature is&#8230;<\/span><span style=\"color: #0000ff\">&lt;\/<\/span><span style=\"color: #800000\">p<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/div>\n<div><span style=\"color: #0000ff\">&#160; <\/span><span style=\"color: #0000ff\">&lt;\/<\/span><span style=\"color: #800000\">body<\/span><span style=\"color: #0000ff\">&gt;<\/span><\/div>\n<div><span style=\"color: #0000ff\">&lt;\/<\/span><span style=\"color: #800000\">html<\/span><span style=\"color: #0000ff\">&gt;<\/span><span style=\"color: #000000\"> <\/span><\/div>\n<p>The embedded SVG file is:<\/p>\n<div><!--\n\nCode highlighting produced by Actipro CodeHighlighter (freeware)\nhttp:\/\/www.CodeHighlighter.com\/\n\n--><span style=\"color: #0000ff\">&lt;?<\/span><span style=\"color: #ff00ff\">xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;<\/span><span style=\"color: #0000ff\">?&gt;<\/span><\/div>\n<div><span style=\"color: #0000ff\">&lt;<\/span><span style=\"color: #800000\">svg:svg <\/span><span style=\"color: #ff0000\">width<\/span><span style=\"color: #0000ff\">=&quot;9.485391pt&quot;<\/span><span style=\"color: #ff0000\"> xmlns:svg<\/span><span style=\"color: #0000ff\">=&quot;http:\/\/www.w3.org\/2000\/svg&quot;<\/span><span style=\"color: #ff0000\"> viewBox<\/span><span style=\"color: #0000ff\">=&quot;0 -8.332031 9.485391 12.854414&quot;<\/span><span style=\"color: #ff0000\"> xmlns:svgmath<\/span><span style=\"color: #0000ff\">=&quot;http:\/\/www.grigoriev.ru\/svgmath&quot;<\/span><span style=\"color: #ff0000\"> height<\/span><span style=\"color: #0000ff\">=&quot;12.854414pt&quot;<\/span><span style=\"color: #0000ff\">&gt;&lt;<\/span><span style=\"color: #800000\">svg:metadata<\/span><span style=\"color: #0000ff\">&gt;&lt;<\/span><span style=\"color: #800000\">svgmath:metrics <\/span><span style=\"color: #ff0000\">top<\/span><span style=\"color: #0000ff\">=&quot;9.8251171875&quot;<\/span><span style=\"color: #ff0000\"> bottom<\/span><span style=\"color: #0000ff\">=&quot;1.8387890625&quot;<\/span><span style=\"color: #ff0000\"> baseline<\/span><span style=\"color: #0000ff\">=&quot;4.5223828125&quot;<\/span><span style=\"color: #ff0000\"> axis<\/span><span style=\"color: #0000ff\">=&quot;8.5067578125&quot;<\/span><span style=\"color: #0000ff\">\/&gt;&lt;\/<\/span><span style=\"color: #800000\">svg:metadata<\/span><span style=\"color: #0000ff\">&gt;&lt;<\/span><span style=\"color: #800000\">svg:text <\/span><span style=\"color: #ff0000\">font-size<\/span><span style=\"color: #0000ff\">=&quot;12.000000&quot;<\/span><span style=\"color: #ff0000\"> text-anchor<\/span><span style=\"color: #0000ff\">=&quot;middle&quot;<\/span><span style=\"color: #ff0000\"> y<\/span><span style=\"color: #0000ff\">=&quot;0.000000&quot;<\/span><span style=\"color: #ff0000\"> x<\/span><span style=\"color: #0000ff\">=&quot;3.061523&quot;<\/span><span style=\"color: #ff0000\"> font-family<\/span><span style=\"color: #0000ff\">=&quot;Times New Roman&quot;<\/span><span style=\"color: #ff0000\"> font-style<\/span><span style=\"color: #0000ff\">=&quot;italic&quot;<\/span><span style=\"color: #ff0000\"> fill<\/span><span style=\"color: #0000ff\">=&quot;black&quot;<\/span><span style=\"color: #0000ff\">&gt;<\/span><span style=\"color: #000000\">x<\/span><span style=\"color: #0000ff\">&lt;\/<\/span><span style=\"color: #800000\">svg:text<\/span><span style=\"color: #0000ff\">&gt;&lt;<\/span><span style=\"color: #800000\">svg:g <\/span><span style=\"color: #ff0000\">transform<\/span><span style=\"color: #0000ff\">=&quot;translate(5.724609, 2.683594)&quot;<\/span><span style=\"color: #0000ff\">&gt;&lt;<\/span><span style=\"color: #800000\">svg:text <\/span><span style=\"color: #ff0000\">font-size<\/span><span style=\"color: #0000ff\">=&quot;8.520000&quot;<\/span><span style=\"color: #ff0000\"> text-anchor<\/span><span style=\"color: #0000ff\">=&quot;middle&quot;<\/span><span style=\"color: #ff0000\"> y<\/span><span style=\"color: #0000ff\">=&quot;0.000000&quot;<\/span><span style=\"color: #ff0000\"> x<\/span><span style=\"color: #0000ff\">=&quot;1.684863&quot;<\/span><span style=\"color: #ff0000\"> font-family<\/span><span style=\"color: #0000ff\">=&quot;Times New Roman&quot;<\/span><span style=\"color: #ff0000\"> font-style<\/span><span style=\"color: #0000ff\">=&quot;italic&quot;<\/span><span style=\"color: #ff0000\"> fill<\/span><span style=\"color: #0000ff\">=&quot;black&quot;<\/span><span style=\"color: #0000ff\">&gt;<\/span><span style=\"color: #000000\">I<\/span><span style=\"color: #0000ff\">&lt;\/<\/span><span style=\"color: #800000\">svg:text<\/span><span style=\"color: #0000ff\">&gt;&lt;\/<\/span><span style=\"color: #800000\">svg:g<\/span><span style=\"color: #0000ff\">&gt;&lt;\/<\/span><span style=\"color: #800000\">svg:svg<\/span><span style=\"color: #0000ff\">&gt;<\/span><span style=\"color: #000000\"> <\/span><\/div>\n<p>I&rsquo;m basically trying to support MathML with SVG as a backup over at <a href=\"http:\/\/www.circuitdesign.info\/blog\" target=\"_blank\">the circuit design site<\/a>. I guess the 7% of visitors that use Chrome will have to deal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Chrome seems to have a bug in its rendering of SVG files. Here&rsquo;s what it looks like: Here&rsquo;s what the same files look like under Firefox: The HTML file I used to test this is: &lt;html&gt; &#160; &lt;head&gt; &#160;&#160;&#160; &lt;title&gt;Test&lt;\/title&gt; &#160; &lt;\/head&gt; &#160; &lt;body&gt; &#160;&#160;&#160; &lt;p&gt;The received in-phase is &lt;object type=&quot;image\/svg+xml&quot; data=&quot;665dd30fd32270d75e7871a23e9ae2b3.svg&quot;&gt;&lt;\/object&gt;and the quadrature [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[189,191,188,190],"class_list":["post-633","post","type-post","status-publish","format-standard","hentry","category-web","tag-html","tag-mathml","tag-svg","tag-web-development"],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/comments?post=633"}],"version-history":[{"count":0,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/633\/revisions"}],"wp:attachment":[{"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/media?parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/categories?post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poojanblog.com\/blog\/wp-json\/wp\/v2\/tags?post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}