phax/ph-pdf-layout

How to correct display Chinese?

KenteJohn opened this issue · 19 comments

I get some "?" characters when I write a sentense in Chinese. I have tried almost all the fonts, but it didn't work. I hope to get your response as soon as possible,thank you.

phax commented

Hi, try selecting a font at https://fonts.google.com/?subset=chinese-simplified - that should give you a quite broad range.

If you find something suitable, I may be able to add it to https://github.com/phax/ph-fonts to have it available in a more suitable way.

hth

Thank you for your help, but due to some policy reasons, I can't visit google.com in China. Everything in your project fits me but fonts, I need Chinese support very much and don't want to give it up.

Maybe 'Noto Sans HK' can work?

phax commented

Hi. It only has "Noto Sans SC":
grafik

If you like, you can paste an example text here and I send you the screenshot.

phax commented

My bad. I also found the "Noto Sans HK"

phax commented

Glyphs of Noto Sans HK:
grafik

Is that what you are looking for?

Wow, 'Noto Sans SC' is ok.

phax commented

Just for comparison, these are the glyphs of "Noto Sans SC":
grafik

HK is complex font, SC is simplified font. I want the simplified font.

Maybe 'SC' is simplified Chinese, I guess.

phax commented

Yes exactly. There is also a version "TC" for "Traditional Chinese"

So, I can use this font at some point in the future, maybe after a few days or months?

phax commented

Yes, I am just trying it out in https://github.com/phax/ph-fonts - if it works, I will release 4.1.2 and create an example in here.

Is this is a reasonable test text:

他们所有的设备和仪器彷佛都是有生命的。

???

Yes and thank you for your support.

phax commented

Unfortunately it doesn't work. pdfbox has problems with the OTF font. Any conversion tool from OTF to TTF I tried so far failed :(

I believe you can resolve this problem. 加油!

phax commented

So I found a solution.
Please see the attached PDF examples.
Do they look good for you?

font-noto-sans-hk.pdf
font-noto-sans-sc.pdf

I can not see them. The hyperlinks are invalid. Could you give me the directory path about your output?

oh, I get the path: pdf/pltext/font-noto-sans-sc.pdf.
Thank you.