yash-yp / chaoss-workspace

0 stars 0 forks source link

Converted PDF does not display Chinese characters #2

Closed yash-yp closed 3 years ago

yash-yp commented 3 years ago

When the metrics are converted from LaTeX to PDF, the Chinese characters do not get displayed.

This can likely be solved by using the right package and font in the LaTeX source file.

image

yash-yp commented 3 years ago

As expected the Chinese characters get recognized once we include the correct package. Depending on the PDF engine used (XeLaTeX):

\usepackage{xeCJK}

The Chinese fonts can be set by:

\setCJKmainfont{}
\setCJKmonofont{}
\setCJKsansfont{}

Further, the list of Chinese fonts available on the system can be checked using the command: fc-list :lang=zh

yash-yp commented 3 years ago

The characters now display correctly : yash-gsoc-dev/POCs/POC-chinese

image

GeorgLink commented 3 years ago

Thanks for investigating this and finding a solution.