fschutt / printpdf

A fully-featured PDF library for Rust, WASM-ready
https://fschutt.github.io/printpdf/
MIT License
825 stars 98 forks source link

HTML text is missing #198

Open barabadzhi opened 1 day ago

barabadzhi commented 1 day ago

The WASM demo linked in the repo as well as native lib loosing all text content from HTML. The actual text seems OK, but shaped_words / glyphs come out empty.

fschutt commented 1 day ago

Yeah, this is an issue I'm debugging atm, it seems that allsorts::subset::subset(font, glyphs) reorders the glyph IDs so lookup_glyph(char as u32) fails. This should be fixed upstream however.

fschutt commented 1 day ago

The issue was that the subsetted font didn‘t contain some glyphs because I didn’t encode the WINDOWS_1252 codepage properly. Should be fixed tomorrow.