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

PDF export issue when Noto CJK font is used #6275

Open
Velo-C opened this issue Feb 20, 2025 · 8 comments
Open

PDF export issue when Noto CJK font is used #6275

Velo-C opened this issue Feb 20, 2025 · 8 comments

Comments

@Velo-C
Copy link

Velo-C commented Feb 20, 2025

Describe the bug
從 1.9.5 升級到最新的 1.10.6 後,使用 pandoc(3.6.3) 轉 PDF 會變成亂碼。
降級回1.9.5則正常。

Screenshots / Screencasts
亂碼情況如下圖。
Image

Desktop (please complete the following information):
Windows 10 64bit

Additional context
過去重開程式,並且重新匯出,有機會解決亂碼問題。
但這次重開之後無效,選擇降級才解決了。

@abnerlee
Copy link
Contributor

Please attach the sample md file.
And are you export directly from menu bar → File → Export → PDF?

@liluoxi
Copy link

liluoxi commented Feb 26, 2025

同样的问题降版本使用的,待解决

@Velo-C
Copy link
Author

Velo-C commented Feb 26, 2025

Please attach the sample md file. And are you export directly from menu bar → File → Export → PDF?

已上傳測試用的md和幾份匯出的pdf,請參考壓縮檔:
https://drive.google.com/open?id=1JHkL17sdkaIogPMrQCfwqeqNA7nWMvHd&usp=drive_fs

針對兩個版本做了一點測試,這次是發現:

  1. 升級版本後,匯出的pdf中,中文字都不見了。
  2. 試著換了主題來測試,發現兩份匯出檔案,目錄的地方出現不同。一個是完全沒顯示目錄,另一個只有中文的地方不見。

不知道可能是哪裡出了問題,感謝您的協助!

@abnerlee
Copy link
Contributor

Does export work for "Newsprint" theme?

@Velo-C
Copy link
Author

Velo-C commented Feb 27, 2025

Newsprint 匯出結果如下圖:

Image

@abnerlee
Copy link
Contributor

abnerlee commented Feb 27, 2025

In my test it works fine...
May relates https://issues.chromium.org/issues/352359913

Did you install any adobe fonts, such as https://github.com/adobe-fonts/source-han-sans, like https://issues.chromium.org/issues/352359913#comment4 indicates?

@abnerlee
Copy link
Contributor

And maybe relates https://blog.hentioe.dev/posts/windows-chrome-128-noto-cjk-fonts.html

Does your system have noto fonts installed? and Change defaultFontFamily https://support.typora.io/Advance-Config/#defaultfontfamily back to "Microsoft JhengHei" solve this?

@Velo-C
Copy link
Author

Velo-C commented Feb 27, 2025

感謝!太厲害了,真的是字體的問題!我之前的確有把自定義CSS的某些字型改成Noto CJK,現在把Noto家族的字體改掉之後,就可以正常匯出PDF了!

@Velo-C Velo-C closed this as completed Feb 27, 2025
@abnerlee abnerlee reopened this Feb 27, 2025
@abnerlee abnerlee changed the title 1.10.6 pandoc轉PDF失敗 PDF export issue when Noto CJK font is used Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants