-
Notifications
You must be signed in to change notification settings - Fork 564
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
Arabic and hebrew texts not supporting #270
Comments
what kind of help is required here? I'm a Frasi native speaker that can help change code and verify the results, however I'm not really sure if I know what piece of code is to be changed here. I took a short look at the latest version and can't really spot the place where the drawing of an element with unicode text is happening. |
FYI, I tracked it down to this method |
@mohamnag Hi. Wow, thank you for debugging this problem with fonts. I think we can change this encoding. Can you provide a simple example of such html and font, so we could add this example to FS tests? |
well I went on and used a custom font where I can set the encoding. the result was unfortunately still problematic. lets take this sample HTML:
I have the font (can get it for free from https://github.com/rastikerdar/vazirmatn/releases/tag/v33.003) unzipped into resources directory and this is my Java code:
now this is the output that FS is giving me: and this is what a browser gives me (ignoring the font not being applied): there are two problems here:
in general I would first go for solving this problem using a custom font (which for sure has all chars) and then maybe looking into fixing that charset for default font. |
btw, you have probably seen this example of RTL rendering using OpenPDF but I just to mention it: https://github.com/LibrePDF/OpenPDF/blob/master/pdf-toolbox/src/test/java/com/lowagie/examples/fonts/styles/RightToLeft.java I don't know if this is different than what FS is doing under the hood when working with OpenPDF but I couldn't find any of those methods being called. |
I also found this post: https://groups.google.com/g/flying-saucer-users/c/n0CfuYfpQ6I/m/3iJIaZ4IAAAJ |
Arabic and hebrew texts not supporting
The text was updated successfully, but these errors were encountered: