pdf_translator icon indicating copy to clipboard operation
pdf_translator copied to clipboard

cannot show zh-cn correctly

Open LYMDLUT opened this issue 11 months ago • 3 comments

image

LYMDLUT avatar Mar 02 '24 06:03 LYMDLUT

seems the problem is that the font does not support all the characters. you could try replacing the font with one that supports CN

ppisljar avatar Mar 04 '24 09:03 ppisljar

可以在window环境中部署嘛?

Yqao avatar Mar 07 '24 12:03 Yqao

Add a Chinese-supporting font to the fonts directory in the root of the project by downloading a ttf format font. In modules/font/simple.py, you can simply change the last line that reads 'TimesNewRoman' to the name of the font you added.

fonts
├── FZHTK.ttf
├── FreeMono.ttf
└── TimesNewRoman.ttf
return 'FZHTK.ttf', font_size, ygain

Dunky-Z avatar Mar 16 '24 01:03 Dunky-Z