Open
Description
Hello, it looks like for some special text, the getTextWidth does not work properly. Below is an example. As you could see I have added a space between "FILE_VALIDATE_NAME" and "World", but in the generated doc, there is almost no space. Another example below works.
Thanks!
The code could be copied to http://raw.githack.com/MrRio/jsPDF/master/ to reproduce.
var doc = new jsPDF();
var t = "FILE_VALIDATE_NAME";
doc.text(t, 20, 20)
var l = doc.getTextWidth(t);
var sl = doc.getTextWidth(" ");
var startX = 20 + l + sl;
// No space between _NAME and World
doc.text("World", startX, 20)
// below is ok
var t = "FILE";
doc.text(t, 20, 40)
var l = doc.getTextWidth(t);
var sl = doc.getTextWidth(" ");
var startX = 20 + l + sl;
doc.text("World", startX, 40)