{"action":"opened","issue":{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/4196","repository_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf","labels_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/4196/labels{/name}","comments_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/4196/comments","events_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/4196/events","html_url":"https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4196","id":388566244,"node_id":"MDU6SXNzdWUzODg1NjYyNDQ=","number":4196,"title":"Asian (Japanese, Chinese etc.) texts are messed up in SVG output.","user":{"login":"gluper","id":26507908,"node_id":"MDQ6VXNlcjI2NTA3OTA4","avatar_url":"https://avatars3.githubusercontent.com/u/26507908?v=4","gravatar_id":"","url":"https://api.github.com/users/gluper","html_url":"https://github.com/gluper","followers_url":"https://api.github.com/users/gluper/followers","following_url":"https://api.github.com/users/gluper/following{/other_user}","gists_url":"https://api.github.com/users/gluper/gists{/gist_id}","starred_url":"https://api.github.com/users/gluper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gluper/subscriptions","organizations_url":"https://api.github.com/users/gluper/orgs","repos_url":"https://api.github.com/users/gluper/repos","events_url":"https://api.github.com/users/gluper/events{/privacy}","received_events_url":"https://api.github.com/users/gluper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-07T09:14:46Z","updated_at":"2018-12-07T09:14:46Z","closed_at":null,"author_association":"NONE","body":"**wkhtmltopdf version(s) affected**: 0.12.5 \r\n\r\n**OS information**\r\nWindows 7 Pro\r\n\r\n**Description**\r\nThe simplest HTMLs with Japanese texts produces messed up SVG output. The text multiple times, depending on the count of space character in the line. The PNG output is OK.\r\n\r\n**How to reproduce**\r\nGenerate a SVG from this HTML\r\n\r\n```\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n  <head>\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />  \r\n    <title>This creates bad SVG</title>    \r\n  </head>\r\n  <body>\r\n\t\t <p>ドライブの 3 箇所の P 地点によって成立する円の半径です。</p>\r\n  </body>\r\n</html>\r\n\r\n```\r\nGenerate SVG with\r\nwkhtmltoimage text.html  text.svg\r\n\r\nThis outputs this SVG file:\r\nText appears 5 times, with the same Y-coordinate, and with different X-coorinate, messing up the output. The repeats count depend on the count of space characters in the string. If the text has no spaces, it works as expected.\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n<svg width=\"361.244mm\" height=\"18.3444mm\"\r\n viewBox=\"0 0 1024 52\"\r\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"  version=\"1.2\" baseProfile=\"tiny\">\r\n<title>Qt Svg Document</title>\r\n<desc>Generated with Qt</desc>\r\n<defs>\r\n</defs>\r\n<g fill=\"none\" stroke=\"black\" stroke-width=\"1\" fill-rule=\"evenodd\" stroke-linecap=\"square\" stroke-linejoin=\"bevel\" >\r\n\r\n<g fill=\"#ffffff\" fill-opacity=\"1\" stroke=\"none\" transform=\"matrix(1,0,0,1,0,0)\"\r\nfont-family=\"MS Shell Dlg 2\" font-size=\"8.25\" font-weight=\"400\" font-style=\"normal\" \r\n>\r\n<path vector-effect=\"non-scaling-stroke\" fill-rule=\"evenodd\" d=\"M0,0 L1024,0 L1024,52 L0,52 L0,0\"/>\r\n<path vector-effect=\"non-scaling-stroke\" fill-rule=\"evenodd\" d=\"M0,0 L1024,0 L1024,52 L0,52 L0,0\"/>\r\n</g>\r\n\r\n<g fill=\"#000000\" fill-opacity=\"1\" stroke=\"#000000\" stroke-opacity=\"1\" stroke-width=\"1\" stroke-linecap=\"square\" stroke-linejoin=\"bevel\" transform=\"matrix(1,0,0,1,0,0)\"\r\nfont-family=\"Times New Roman\" font-size=\"16\" font-weight=\"400\" font-style=\"normal\" \r\n>\r\n<text fill=\"#000000\" fill-opacity=\"1\" stroke=\"none\" xml:space=\"preserve\" x=\"8\" y=\"31\" font-family=\"Times New Roman\" font-size=\"16\" font-weight=\"400\" font-style=\"normal\" \r\n >ドライブの 3 箇所の P 地点によって成立する円の半径です。</text>\r\n<text fill=\"#000000\" fill-opacity=\"1\" stroke=\"none\" xml:space=\"preserve\" x=\"68\" y=\"31\" font-family=\"Times New Roman\" font-size=\"16\" font-weight=\"400\" font-style=\"normal\" \r\n >ドライブの 3 箇所の P 地点によって成立する円の半径です。</text>\r\n<text fill=\"#000000\" fill-opacity=\"1\" stroke=\"none\" xml:space=\"preserve\" x=\"84\" y=\"31\" font-family=\"Times New Roman\" font-size=\"16\" font-weight=\"400\" font-style=\"normal\" \r\n >ドライブの 3 箇所の P 地点によって成立する円の半径です。</text>\r\n<text fill=\"#000000\" fill-opacity=\"1\" stroke=\"none\" xml:space=\"preserve\" x=\"129\" y=\"31\" font-family=\"Times New Roman\" font-size=\"16\" font-weight=\"400\" font-style=\"normal\" \r\n >ドライブの 3 箇所の P 地点によって成立する円の半径です。</text>\r\n<text fill=\"#000000\" fill-opacity=\"1\" stroke=\"none\" xml:space=\"preserve\" x=\"146\" y=\"31\" font-family=\"Times New Roman\" font-size=\"16\" font-weight=\"400\" font-style=\"normal\" \r\n >ドライブの 3 箇所の P 地点によって成立する円の半径です。</text>\r\n</g>\r\n</g>\r\n</svg>\r\n\r\n```\r\n\r\nThe problem was already reported here as #3348. It is still reproducible, even with 0.12.5\r\n"}}
{"actor":{"display_login":"gluper"}}