{"id":318,"date":"2006-11-05T21:40:31","date_gmt":"2006-11-05T10:40:31","guid":{"rendered":"http:\/\/www.somethinkodd.com\/oddthinking\/2006\/11\/05\/what-do-i-think-of-the-svg-standard\/"},"modified":"2007-09-10T18:44:22","modified_gmt":"2007-09-10T08:44:22","slug":"what-do-i-think-of-the-svg-standard","status":"publish","type":"post","link":"https:\/\/www.somethinkodd.com\/oddthinking\/2006\/11\/05\/what-do-i-think-of-the-svg-standard\/","title":{"rendered":"What do I think of the SVG standard?"},"content":{"rendered":"<p>I wanted to draw a logo based on a parabolic curve.<\/p>\n<p>So I fired up Photoshop, and quickly realised I couldn&#8217;t draw it by hand.<\/p>\n<p>So I created a template in Excel, dragged it as a background layer into Photoshop, and tried to trace around it. I quickly realised I didn&#8217;t have the skill for that either.<\/p>\n<p>I considered using the <a href=\"http:\/\/www.pythonware.com\/products\/pil\/\">Python Imaging Library<\/a> to construct the logo from first principles and primitive graphics operations. Then I discovered <a href=\"http:\/\/www.w3.org\/Graphics\/SVG\/\">Scalable Vector Graphics<\/a> (SVG) &#8211; a method of representing graphics primitives in an XML format, and have them be represented in your browser. <\/p>\n<p>Cool! A new technology to learn, perfectly suited to my needs: <\/p>\n<ul>\n<li>vectors are good for logos, because they scale well.<\/li>\n<li>XML-based means I can easily modify elements (like an icon-only version, versus a version with the name, or simple colour changes to account for different backgrounds or printing processes).<\/li>\n<li>Fairly quick learning curve &#8211; I understand the principles of &#8220;turtle graphics&#8221;. I understand XML-like syntax. I can get started relatively quickly<\/li>\n<\/ul>\n<p>So, I installed the Adobe SVG View plug-in to IE and set to work.<\/p>\n<p>As I constructed the image, I encountered a few expected hurdles. The ARC syntax is mysterious. The Adobe SVG viewer ignores the textLength parameter. <\/p>\n<p>However, overall I would say it was very successful. Perhaps the approach influenced some of my creative decisions, but I was happy with the result, and I think it would have been hard to reproduce with another technology.<\/p>\n<p>For example, when I decided that the parabola did not look pleasing, I changed to a sine wave. In a raster-based world, that probably would have meant scrapping the image and starting again. Instead, I generated a new vector path in Excel, and simply copied it across.<\/p>\n<p>Having the option in the future of animating the logo &#8211; declaratively! &#8211; was also a big plus.<\/p>\n<p>It was when I had substantially finished the logo design that the problems occurred. I discovered I had just wandered directly right into the middle of another standards-compatibility minefield.<\/p>\n<p>For example, Firefox wouldm&#8217;t display my image until I changed the namespace from the one I found on a SVG tutorial site. Even then, Firefox still paid no attention to the specified font-size. I had realised from the textLength issue earlier that some of the fancier features might not be supported in every browser&#8230; but <em>font-size<\/em>?<\/p>\n<p>I didn&#8217;t care, because I was planning on converting to PNG format anyway before putting it on a web-site.<\/p>\n<p>So to do the conversion, I loaded it into PhotoShop&#8230; or actually found that PhotoShop couldn&#8217;t read SVG files. Despite the fact Adobe wrote the SVG plugin, Adobe PhotoShop can&#8217;t read them!  Odd!<\/p>\n<p>So I searched the web for some simple converters. I found development frameworks. I found payware. I found major infrastructural installs &#8211; nothing simple and free.<\/p>\n<p>I installed a demo of some payware called ABC Amber. It is a great program! It has a colourful UI, tips-of-the-day, nice installer. If I had to be picky and point out one small little problem, it would be <strong>that it doesn&#8217;t read valid SVG<\/strong>!  I don&#8217;t even know why, because the only feedback it gives is &#8220;Failure&#8221;.<\/p>\n<p>I did run my SVG through a validating engine &#8211; and got the all clear.<\/p>\n<p>When I saw that ImageMagick would read SVG, I remembered the pain I had in installing that to support Animated GIFs, and almost gave up. Then I remembered that, back then, I had actually succeeded in installing the part I needed, so I launched ImageMagick&#8217;s display tool. It read the SVG file in without complaint, but cropped it severely and displayed the text in the wrong place &#8211; half off the screen.<\/p>\n<p>I had to convert this image to PNG by displaying it in Internet Explorer, zooming in and taking screenshots. \ud83d\ude41<\/p>\n<p>Right now, I am backing away from SVG very carefully and with no sudden moves, and I am cursing the software industry under my breath for wasting yet another great opportunity to interoperate. <\/p>\n<p>I am sure it is like HTML, CSS, PNG and other web-standards &#8211; No doubt there are techniques to carefully negotiate the majority of common browser bugs to produce images that look roughly the same in each browser. But this is a logo &#8211; it should be damn near <em>identical<\/em> in each browser, and I don&#8217;t have the time to spend a career on learning the tweaks required.<\/p>\n<p>What do I think of the SVG standard? I think Gandhi was right: &#8220;It would be a good idea.&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I discovered <a href=\"http:\/\/www.w3.org\/Graphics\/SVG\/\">Scalable Vector Graphics<\/a> (SVG) &#8211; a method of representing graphics primitives in an XML format, and have them be represented in your browser. <\/p>\n<p>Cool! A new technology to learn, perfectly suited to my needs&#8230; or was it?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[24,47,34],"tags":[],"class_list":["post-318","post","type-post","status-publish","format-standard","hentry","category-cathartic-rant","category-review","category-software-development"],"_links":{"self":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/comments?post=318"}],"version-history":[{"count":0,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/318\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/media?parent=318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/categories?post=318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/tags?post=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}