-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reverse arabic and persian text when using writing marks #466
Comments
Same issue here let text = 'سلام ؟ خوبی ؟ ❤️ چه خبرا.';
let regex = /[\u0600-\u06FF\s]+/gu;
let chars = text.match(regex);
let newText;
if (chars) {
chars = chars.reverse();
let splited = text.split(regex);
newText = splited.reverse()
.map((text, index) => chars[index]?text + " "+chars[index]:text)
.join('');
}else {
newText = text;
}
let paths = font.getPaths(newText) |
Same issue |
Are you using 1.3.4 because that version is outdated. |
Yes, I'm using 1.3.4 |
See the note at https://github.com/opentypejs/opentype.js/releases/tag/1.3.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi , i have problem with writing marks( ! , . , ... ) in arabic and persian text
![image](https://user-images.githubusercontent.com/28533048/106359937-04c9a700-632b-11eb-8cc1-a5aea7863097.png)
The text is reversed when I use marks just like picture
Imagine I want write hello!how are you?
but it reversed it to how how are you?!hello
anyone has any idea to solve this problem tell me please .
The text was updated successfully, but these errors were encountered: