vgalin / html2image

A package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.
MIT License
344 stars 44 forks source link

Rendering Issue: Special Characters Displaying as Blocks in HTML Screenshot #145

Open kamzai opened 5 months ago

kamzai commented 5 months ago

I am encountering an issue while utilizing version 2.0.3 of the platform. Specifically, when attempting to capture a screenshot of an HTML file that includes special characters, such as Chinese characters, the resulting image displays blocks instead of the intended characters. Despite the HTML file rendering correctly when viewed directly, the discrepancy arises solely in the generated screenshot. This inconsistency poses a challenge in accurately capturing and representing the content.

HTML View:

Screenshot 2024-04-05 at 6 14 03 PM

Image View:

Screenshot 2024-04-05 at 6 13 51 PM