{"action":"created","issue":{"url":"https://api.github.com/repos/MrRio/jsPDF/issues/2093","repository_url":"https://api.github.com/repos/MrRio/jsPDF","labels_url":"https://api.github.com/repos/MrRio/jsPDF/issues/2093/labels{/name}","comments_url":"https://api.github.com/repos/MrRio/jsPDF/issues/2093/comments","events_url":"https://api.github.com/repos/MrRio/jsPDF/issues/2093/events","html_url":"https://github.com/MrRio/jsPDF/issues/2093","id":385216432,"node_id":"MDU6SXNzdWUzODUyMTY0MzI=","number":2093,"title":"jsPDF Unicode Languages Support ","user":{"login":"vahiddadaism","id":8435039,"node_id":"MDQ6VXNlcjg0MzUwMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/8435039?v=4","gravatar_id":"","url":"https://api.github.com/users/vahiddadaism","html_url":"https://github.com/vahiddadaism","followers_url":"https://api.github.com/users/vahiddadaism/followers","following_url":"https://api.github.com/users/vahiddadaism/following{/other_user}","gists_url":"https://api.github.com/users/vahiddadaism/gists{/gist_id}","starred_url":"https://api.github.com/users/vahiddadaism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vahiddadaism/subscriptions","organizations_url":"https://api.github.com/users/vahiddadaism/orgs","repos_url":"https://api.github.com/users/vahiddadaism/repos","events_url":"https://api.github.com/users/vahiddadaism/events{/privacy}","received_events_url":"https://api.github.com/users/vahiddadaism/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-28T11:09:23Z","updated_at":"2018-11-28T16:05:52Z","closed_at":null,"author_association":"NONE","body":"I have problem using Unicode characters. I have tested using basic.html but still no success. \r\nI have read the issues related to this problem too but still no success.\r\n\r\nHere is what I have done based on the examples/basic.html:\r\n\r\n```\r\n    var BNAZANIN = \"AAEAAAAQAQAA....\";//shortened. Font is encoded using fontconverter/fontconverter.html \r\n    var doc = new jsPDF();\r\n    doc.addFileToVFS(\"BNAZANIN-normal.ttf\", BNAZANIN);\r\n    doc.addFont('BNAZANIN-normal.ttf', 'BNAZANIN-normal', 'normal');\r\n    doc.setFont('BNAZANIN-normal'); // set font\r\n    doc.text(\"سلام hello\", 10, 10);\r\n    doc.save('test.pdf');\r\n```\r\n\r\nas you see we need to see \"سلام hello\" in the output, but the generated output is as below:\r\n\r\n![capture](https://user-images.githubusercontent.com/8435039/49147525-31806f00-f31a-11e8-9bcc-004177a00f50.PNG)\r\n\r\nIf I use     `doc.text(\"hello\", 10, 10);` still the output is same! Below is the code based on basic.html:\r\n\r\n![image](https://user-images.githubusercontent.com/8435039/49147595-5ecd1d00-f31a-11e8-835a-ac5e6f69c8dc.png)\r\n\r\nIs there any thing wrong with my code?"},"comment":{"url":"https://api.github.com/repos/MrRio/jsPDF/issues/comments/442502197","html_url":"https://github.com/MrRio/jsPDF/issues/2093#issuecomment-442502197","issue_url":"https://api.github.com/repos/MrRio/jsPDF/issues/2093","id":442502197,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjUwMjE5Nw==","user":{"login":"vahiddadaism","id":8435039,"node_id":"MDQ6VXNlcjg0MzUwMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/8435039?v=4","gravatar_id":"","url":"https://api.github.com/users/vahiddadaism","html_url":"https://github.com/vahiddadaism","followers_url":"https://api.github.com/users/vahiddadaism/followers","following_url":"https://api.github.com/users/vahiddadaism/following{/other_user}","gists_url":"https://api.github.com/users/vahiddadaism/gists{/gist_id}","starred_url":"https://api.github.com/users/vahiddadaism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vahiddadaism/subscriptions","organizations_url":"https://api.github.com/users/vahiddadaism/orgs","repos_url":"https://api.github.com/users/vahiddadaism/repos","events_url":"https://api.github.com/users/vahiddadaism/events{/privacy}","received_events_url":"https://api.github.com/users/vahiddadaism/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T16:05:52Z","updated_at":"2018-11-28T16:05:52Z","author_association":"NONE","body":"> Oh I forgot, that I already updated the tests for the new version.\r\n> \r\n> ` doc.text([\"إذا لم تستح فاصنع ما شئت\", \"إذا لم تستح\", \"فاصنع ما شئت\"], 200, 10, {lang: 'ar', align: 'right'});`\r\n\r\nGreat @arasabbasi \r\n\r\nIt works fine for texts that are only contains Arabic/Persian characters. But in case where I am mixing the Arabic characters with English characters nothing is shown in the output.\r\n\r\nHere is my code:\r\n\r\n`doc.text(\"سلام Hello\", 200, 10, {lang: 'ar', align: 'right'});`\r\n\r\n"}}
{"actor":{"display_login":"vahiddadaism"}}