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

The PDF event timetable does not render CJK characters correctly #6135

Open
tomasr8 opened this issue Jan 18, 2024 · 5 comments
Open

The PDF event timetable does not render CJK characters correctly #6135

tomasr8 opened this issue Jan 18, 2024 · 5 comments
Labels

Comments

@tomasr8
Copy link
Member

tomasr8 commented Jan 18, 2024

Copied from the forum so it does not get lost.

... the PDF view of the schedule is not showing the Japanese characters properly.

image

Possible solutions:

@tomasr8 tomasr8 added the bug label Jan 18, 2024
@ThiefMaster
Copy link
Member

Can we try the receipt generation with CJK chars to see if wasyprint supports it? If we moved this thing to weasyprint we'd probably be able to get rid of a very nice chunk of extremely legacy code ;)

@hitenvidhani
Copy link

hitenvidhani commented Apr 21, 2024

I think weasyprint doesn't support CJK characters.
Sample script(ensure weasyprint is installed)

from weasyprint import HTML

HTML(string="<p>1101号室/Room 1101, 長崎国際大学1号館/NIU Building 1<p>").write_pdf('output.pdf')

Generated PDF:
image

@ThiefMaster
Copy link
Member

@hitenvidhani I think this may be a matter of configuration / font selection...

@hitenvidhani
Copy link

hitenvidhani commented Apr 25, 2024

Sorry about that, I have verified that CJK chars are working in receipt generation, so yes weasyprint supports it

Notice the name at the end in the receipt and the same name in the timetable(CJK chars printed as box)

Receipt:
image

Timetable:
image

@tomasr8
Copy link
Member Author

tomasr8 commented Apr 25, 2024

Just to give an update, I started working on converting the timeteable generation to weasyprint a while ago and I have a working POC. I'm hoping to get it PR-ready in the coming weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants