We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc81d12 commit 8b5175aCopy full SHA for 8b5175a
plugins/arabic.js
@@ -236,6 +236,14 @@
236
arabicSubst = Object.assign(arabicSubst, arabicorigsubst);
237
return initialForm;
238
}
239
+
240
+ var commonSubstition = function (character) {
241
+ var replacementTable = {
242
+ '(': ')',
243
+ ')': '('
244
+ }
245
+ return replacementTable[character] || character;
246
247
248
var processArabic = jsPDFAPI.processArabic = function (text, reverse) {
249
text = text || "";
@@ -258,7 +266,7 @@
258
266
prevLetter = text[i - 1];
259
267
nextLetter = text[i + 1];
260
268
if (!isArabicLetter(currentLetter)) {
261
- result += currentLetter;
269
+ result += reverse ? commonSubstition(currentLetter) : currentLetter;
262
270
} else {
263
271
if (
264
272
(prevLetter !== undefined)
0 commit comments