{"action":"opened","issue":{"url":"https://api.github.com/repos/doxygen/doxygen/issues/5876","repository_url":"https://api.github.com/repos/doxygen/doxygen","labels_url":"https://api.github.com/repos/doxygen/doxygen/issues/5876/labels{/name}","comments_url":"https://api.github.com/repos/doxygen/doxygen/issues/5876/comments","events_url":"https://api.github.com/repos/doxygen/doxygen/issues/5876/events","html_url":"https://github.com/doxygen/doxygen/issues/5876","id":337483641,"node_id":"MDU6SXNzdWUzMzc0ODM2NDE=","number":5876,"title":"doxygen assumes SVG size is specified in pt, what is not always the case (Origin: bugzilla #755484)","user":{"login":"doxygen","id":1300762,"node_id":"MDQ6VXNlcjEzMDA3NjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1300762?v=4","gravatar_id":"","url":"https://api.github.com/users/doxygen","html_url":"https://github.com/doxygen","followers_url":"https://api.github.com/users/doxygen/followers","following_url":"https://api.github.com/users/doxygen/following{/other_user}","gists_url":"https://api.github.com/users/doxygen/gists{/gist_id}","starred_url":"https://api.github.com/users/doxygen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doxygen/subscriptions","organizations_url":"https://api.github.com/users/doxygen/orgs","repos_url":"https://api.github.com/users/doxygen/repos","events_url":"https://api.github.com/users/doxygen/events{/privacy}","received_events_url":"https://api.github.com/users/doxygen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-02T11:41:57Z","updated_at":"2018-07-02T11:41:57Z","closed_at":null,"author_association":"OWNER","body":"status NEW severity *normal* in component *general* for *---*\nReported in version *unspecified* on platform *Other*\nAssigned to: Dimitri van Heesch\n\nOn 2015-09-23 17:22:48 +0000, Marcin Kasperski wrote:\n\n> In short\n> ============\n> \n> Doxygen code assumes that svg produced by GraphViz has size specified in points.\n> If it is not the case, doxygen (in SVG output mode) generates absurdish HTML, like\n> \n>    <iframe scrolling=\"no\" frameborder=\"0\" src=\"class_c_my_class__inherit__graph.svg\" width=\"8\" height=\"800\">\n> \n> (note width=\"8\", in general the problem results in tiny widths or heights, and HTML in browser shows tiny pieces of images and huge empty space)\n> \n> Would be nice if doxygen handled various size units and if not, at least clearly reported the failure.\n> \n> Actual use case\n> ==============================\n> \n> I faced the problem after switching from png to svg on intranet development server, which runs some legacy version of CentOS and - in particular - has GraphViz 2.12 installed. That version generates .svg with:\n> \n>    <svg width=\"1.22in\" height=\"1.16in\"\n>       xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n> \n> (GraphViz switched from in to pt-based size at 2.14 and if I read blame correctly, there also was short period during which it sized in px)\n> \n> We will resolve the problem by upgrading graphviz to more modern version, but it took us quite a lot of time to find out what is going onâ¦ And, more âgenerallyâ speaking, there is no guarantee that it will always size images in pt.\n> \n> Technical details\n> ======================\n> \n> The code responsible for the problem is in dot.cpp, there are two sscanfs like:\n>     sscanf(buf,\"<svg width=\\\"%dpt\\\" height=\\\"%dpt\\\"\n> \n> Interesting example of more sophisticated code which read SVG image size can be found â¦â¦â¦ in graphviz (current one, not ancient):\n> https://github.com/ellson/graphviz/blob/master/lib/gvc/gvusershape.c#L205\n> (function svg_units_convert and bottom half of svg_size could likely be adapted for doxygen needs)\n> \n> If this seems overkill, it would be nice if doxygen at least clearly failed (or at least warned) that it can't properly read SVG size and that it likely means obsolete GraphViz version.\n\n"}}
{"actor":{"display_login":"doxygen"}}