{"action":"closed","issue":{"url":"https://api.github.com/repos/devongovett/pdfkit/issues/402","labels_url":"https://api.github.com/repos/devongovett/pdfkit/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/devongovett/pdfkit/issues/402/comments","events_url":"https://api.github.com/repos/devongovett/pdfkit/issues/402/events","html_url":"https://github.com/devongovett/pdfkit/issues/402","id":86823860,"number":402,"title":"Some CJK characters are not visible depending on the length of text","user":{"login":"niklauslee","id":2884771,"avatar_url":"https://avatars.githubusercontent.com/u/2884771?v=3","gravatar_id":"","url":"https://api.github.com/users/niklauslee","html_url":"https://github.com/niklauslee","followers_url":"https://api.github.com/users/niklauslee/followers","following_url":"https://api.github.com/users/niklauslee/following{/other_user}","gists_url":"https://api.github.com/users/niklauslee/gists{/gist_id}","starred_url":"https://api.github.com/users/niklauslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklauslee/subscriptions","organizations_url":"https://api.github.com/users/niklauslee/orgs","repos_url":"https://api.github.com/users/niklauslee/repos","events_url":"https://api.github.com/users/niklauslee/events{/privacy}","received_events_url":"https://api.github.com/users/niklauslee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-10T03:47:28Z","updated_at":"2015-11-10T05:35:22Z","closed_at":"2015-11-10T05:35:22Z","body":"Some CJK characters are not visible depending on the length of text. The below is the code reproducing the problem. We have two strings \"text1\" and \"text2\". It works fine when we try to output one of them. But some chars are not visible when we're trying to output the two strings.\r\n\r\nI've tested with Chinese characters but same problem occurs. The \".ttf\" file is Google's NotoSansCJK KR (https://www.google.com/get/noto/). Actually, NotoSans is distributed in \".otf\" but I've transformed the \".otf\" file to \".ttf\" format using FontForge and it works fine with other applications, so problem in the \".ttf\" file. Here is the font file: [NotoSansCJK-Regular.ttf](http://starumlad-7a0.kxcdn.com/NotoSansCJK-Regular.ttf)\r\n\r\nPlease help me! (I'm using pdfkit v0.7.1)\r\n\r\n__example code__\r\n\r\n```javascript\r\nvar fs          = require('fs'),\r\n    PDFDocument = require('pdfkit');\r\n\r\nvar text1 = \"한국어는 주로 제주특별자치도를 제외한 한반도 및 그 부속 도서와 한민족 거주 지역에서 쓰이는 언어로,\"\r\n          + \"대한민국에서는 한국어, 한국말이라고 부르고, 조선민주주의인민공화국과 중화인민공화국에서는 조선어,\"\r\n          + \"조선말이라고 부르며, 우즈베키스탄, 러시아 등 구 소련의 고려인들 사이에서는 고려말이라고 부른다.\";\r\n\r\nvar text2 = \"도를 도라 부르면, 이미 그 도가 아니다.\"\r\n          + \"이름 부를 수 있으나, 언제나 그 이름은 아니다.\"\r\n          + \"이름이 없을 때 천지가 있었고,\"\r\n          + \"이름이 생기자 만물이 태어났다.\"\r\n          + \"그렇기에 언제나 없음으로 그 근원을 보고,\"\r\n          + \"언제나 있음으로 그 드러남을 보라.\"\r\n          + \"없음과 있음은 하나에서 나온 두가지 이름이라, 이를 현묘하다 한다.\"\r\n          + \"현묘하고 현묘하니, 모든 오묘함의 문이 된다.\";\r\n\r\nvar doc = new PDFDocument();\r\ndoc.pipe(fs.createWriteStream('test.pdf'));\r\ndoc.registerFont('NotoSansCJK', 'NotoSansCJK-Regular.ttf');\r\ndoc.fontSize(13);\r\ndoc.font(\"NotoSansCJK\");\r\n\r\ndoc.text(text1);\r\ndoc.text(text2);\r\n\r\ndoc.stroke();\r\ndoc.end();\r\n```\r\n\r\n__text1__ (works fine)\r\n\r\n![2015-06-10 12 25 25](https://cloud.githubusercontent.com/assets/2884771/8074346/077d8016-0f6c-11e5-88c4-e965a2410288.png)\r\n\r\n__text2__ (works fine)\r\n\r\n![2015-06-10 12 24 46](https://cloud.githubusercontent.com/assets/2884771/8074345/075ea538-0f6c-11e5-9110-199bce9cf2bf.png)\r\n\r\n__text1 and text2__ (some chars are not visible in text2)\r\n\r\n![2015-06-10 12 25 59](https://cloud.githubusercontent.com/assets/2884771/8074347/077efea0-0f6c-11e5-95b7-4b1574f1a302.png)\r\n\r\n__text2 and text1__ (some chars are not visible in text1)\r\n\r\n![2015-06-10 12 40 00](https://cloud.githubusercontent.com/assets/2884771/8074471/00b9ad2a-0f6e-11e5-8188-68a31db5b900.png)"}}