A bit of a clarification on this issue: Javascript internally uses UTF-16 for strings, so characters until U+FFFF work as expected. Above that though, they're encoded in pairs of characters from U+D800 to U+DFFF, which are defined to be invalid codepoints otherwise. So characters from U+10000 onward will end up in the TTF as U+Dxxx, and the rest of the characters on that line will be misaligned.