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

How can I contribue Chinese version of documents? #8

Open
yangzhongke opened this issue Feb 9, 2022 · 9 comments
Open

How can I contribue Chinese version of documents? #8

yangzhongke opened this issue Feb 9, 2022 · 9 comments

Comments

@yangzhongke
Copy link

I'd like to contribute Chinese version of documents.
What should I do? Can I create a ***_ZH_CN.md, for example, Readme_ZH_CN.md?

@MarcinZiabek
Copy link
Member

Hello 😁

This is tough... I would really appreciate your help in translating the documentation and making it more accessible. However, right now, I am planning a huge update - this is my highest priority for nearest months. Organizining documentation structure, explaining API more precisly and adding more examples. Would it be possible for you to wait until the update is done?

In the meantime - I really need a foreign language expert. I am using Polish and English fluently but their structures are pretty simple and do not introduce any difficulties in text rendering. I am sure that QuestPDF is not perfect when working with more complex languages, e.g. Chinese, Japanese or Arabic. There is an additional step required called "text shaping" - where two or more text characters are combined together to create a text symbol. Would you like to create a separate discussion about this topic and help me test if algorithm results are as expected? So we can fix any existing issues? That would be great 😊

@MarcinZiabek
Copy link
Member

QuestPDF.Examples - this is a source of examples for documentation and tests for more complex structures. It is great as I can get visualization of the algorithm results.

QuestPDF.UnitTests - this is my current approach to test behaviors of elemenets. It allows to test even most complex cases. However, I am thinking/working on a much simpler test engine that will not be coupled so much with internal implementation and will also allow to visualise and compare results when debugging.

QuestPDF.ReportSample - this project is to test most common elements together and observe if everything is stable. Some issues may appear only after certain number of pages (due to float number rounding).

@yangzhongke
Copy link
Author

image
It doesn't wokr well with Chinese characters.
I have no idea of PDF format. What can I do to solve this issue? If you can give me some hints, maybe I can try to fix it.

@MarcinZiabek
Copy link
Member

Can please try with a font that supports Chinese characters? For example Microsoft JhengHei? I have used it in my test as it is available on Windows 11 by default. Got nicely rendered characters - not sure if correctly rendered though.

@yangzhongke
Copy link
Author

Cool. It works well.
image
image

Is there any further thing I can do with the i18n things?

@MarcinZiabek
Copy link
Member

That's great it works correctly for Chinese. Thank you for checking it 😁

Recently, I was playing with Arabic and trying to use the HarfBuzz library to shape the text (so characters are correctly connected together within a word). It is hard to validate though as I don't know anything about Arabic 😂 And it still requires updating a lot of code in the library to properly measure and break text, something separate for a release.

Once I gather more time and prepare next version of the documentation, I will let you know. That would be awesome to have it transalted! This may take around 2-3 months as I am not sure about my life priorities and my time availability.

@yangzhongke
Copy link
Author

yangzhongke commented Feb 12, 2022

I'm a microsoft MVP, and I'll try to ask Arabic MVPs for help in the MVP community.

@MarcinZiabek
Copy link
Member

That would be fantastic, thank you!

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

No branches or pull requests

2 participants