jsPDF
jsPDF copied to clipboard
Parenthesis symbols are reversed, if rtl flag is enabled
Hi,
Currently parentheses are inverted, if rtl flags are enabled. I have found those flags in this issue https://github.com/parallax/jsPDF/issues/2235
In almost case rtl output seems to be valid, but in case of numbers (phone, fax, etc) there is an issue, Sample to reproduce: - https://jsfiddle.net/L6e20pym/7/
var doc = new jspdf.jsPDF();
const textOptions = {};
textOptions.isInputVisual = false;
textOptions.isOutputVisual = true;
textOptions.isInputRtl = true;
textOptions.isOutputRtl = false;
const text = '(800) 955-2292';
doc.text(100, 10, text, textOptions);
var data = doc.save();
Expected text: 955-2292 (800) Actual text: 955-2292 )800(
As you can see, parenthesis are inverted

Did you set the font correctly? Might be related to #3171 or #3224.
I have the same. Amiri font, language set to ar.
BiDi options:
- options.isInputVisual = false;
- options.isOutputVisual = true;
- options.isInputRtl = true;
- options.isOutputRtl = false;
Much has been improved since latest releases so mixed content like an email address gets rendered way better than before. But parenthesis still get reversed.
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.
This is still relevant. Would be nice if the parenthesis would work correctly out of the box in these situations as well.
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.
And once again a bump. Please fix this.
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.
And once again a bump. Please fix this.
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.
And once again a bump. Please fix this.
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.
And once again a bump. Please fix this. This is ridiculous! Why is noone even replying to these issues?
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.