pdfium-lib
pdfium-lib copied to clipboard
Loading Fonts from Network for Correct Text Rendering in PDFium
Is your feature request related to a problem? Please describe. We're encountering difficulties rendering Chinese text using wasm due to potential missing fonts. It's crucial to address this issue to ensure accurate text rendering.
Describe the solution you'd like We need a method to load fonts fetched from the network into PDFium. This would enable PDFium to render text correctly, resolving the font-related rendering issues.
Additional context The ability to dynamically load fonts from network sources would significantly enhance PDF rendering capabilities, especially for languages with complex character sets like Chinese.
Hi. This is a know problem for these fonts.
Do you know what need do? I can create a patch, but i need understand what really we need.
Thank you very much for your reply. I haven't had a chance to look at the code implementation of PDFium yet. However, my design idea is to support configuring font source URLs. When parsing the document, retrieve the fonts involved in the document and make requests to obtain the corresponding fonts from the font source. If not found, the system will automatically fallback to a basic font to ensure the document displays correctly.
Hi @Dingzhaocheng, it works for you: https://github.com/paulocoutinhox/pdfium-lib/issues/114
?
Awesome, looks like what I expected, I'll try it
Hi,
Project was updated to latest version.
If your problem was solved, can you close the issue pls?
Thanks.