Skip to content
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

RTL Support issue in PDF export #777

Open
wada3n opened this issue Jan 27, 2024 · 9 comments
Open

RTL Support issue in PDF export #777

wada3n opened this issue Jan 27, 2024 · 9 comments
Labels
bug Something isn't working
Milestone

Comments

@wada3n
Copy link

wada3n commented Jan 27, 2024

Hi,
I would like to thank you for your hard work and dedication to developing Denaro. I am a big fan of the software and I appreciate all the effort that you put into making it a great product.

I am using the Denaro to track my finances. I am using the Arabic language and I am exporting PDF files. When I choose an Arabic currency symbol, such as "دج", the numbers are displayed upside down.

For example, the number 1000 is displayed as "0001". This is a problem because it makes it difficult to read and understand the PDF files.

I have attached a screenshot of the issue.
Screenshot from 2024-01-27 19-24-48
Screenshot from 2024-01-27 19-24-28

- Expected behavior:

The numbers should be displayed correctly, with the thousands digit to the left and the units digit to the right.

- Possible solutions:

One possible solution is to change the way that the Arabic currency symbols are handled when exporting PDF files.

Thank you for your time and consideration.

@nlogozzo nlogozzo added the bug Something isn't working label Jan 27, 2024
@JoseBritto
Copy link
Member

Hi. Can you copy and paste the troubleshooting information from the about>Troubleshooting page of Denaro? That'll make it easier for me to reproduce this. LC_NUMERIC and LC_MONETARY are probably the important variables there.

@wada3n
Copy link
Author

wada3n commented Jan 31, 2024

Hi. Can you copy and paste the troubleshooting information from the about>Troubleshooting page of Denaro? That'll make it easier for me to reproduce this. LC_NUMERIC and LC_MONETARY are probably the important variables there.

Hi,
Here you go.

org.nickvision.money
2024.1.0
GTK 4.12.4
libadwaita 1.4.2
Flatpak
en-US
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

@JoseBritto
Copy link
Member

Oh so its just the currency symbol thats set to Arabic not the system locale?

@JoseBritto
Copy link
Member

image
We've got two problems here.

  1. The character دج causes the text its used in to flip.
  2. That character isn't rendered properly in the pdf.

In the App gui it causes the currency symbol and the + and - sign to be on the other side but doesnt flip the number.

image
image
image

@wada3n Thanks for reporting this bug. I'll try to see if I can do something when I get home :)

@wada3n
Copy link
Author

wada3n commented Feb 1, 2024

Hi @JoseBritto ,
I can live with issue 2 inside the app, but it's quite annoying when exporting PDF files.

I really appreciate the way you implemented the currency symbol positioning option in the app. It's a very thoughtful solution that technically solves the problem. Arabic is written from right to left, so selecting the last option in the dropdown menu actually fixes the issue.
It is true that it turns the format opposite to the intended idea in the application, but it is acceptable, while the big problem is in exporting to PDF.
I'm excited to see what you come up with in the future.

Thanks again for your dedication and hard work. I'm a big fan of Denaro!

@JoseBritto
Copy link
Member

JoseBritto commented Feb 2, 2024

Issue 1 is a known bug in QuestPdf QuestPDF/QuestPDF#752
I'll see if I can implement the workaround

@JoseBritto
Copy link
Member

Splitting the number and symbol into different text blocks seems to fix this but I couldn't figure out how to get the formatting right.

@nlogozzo
Copy link
Member

nlogozzo commented Feb 2, 2024

With the C++ rewrite coming, QuestPDF won't be used anyway...so I say let's see what happens in the rewrite

@nlogozzo nlogozzo added this to the V2024.2.0 milestone Feb 2, 2024
@wada3n
Copy link
Author

wada3n commented Feb 2, 2024

Well, no problem at all, I can live with it by choosing another symbol "DZ"
Thank you both @JoseBritto & @nlogozzo for the great effort you are doing.
Waiting for c++ version 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants