saethlin / pdfpdf

Pretty Darn Fast PDF library for Rust (mostly exists to power pdfplot)
7 stars 2 forks source link

unicode characters #1

Open soson opened 6 years ago

soson commented 6 years ago

Hi,

i have tried to add slovak unicode characters (ľščťžýáíéôú) to example/text.rs and compile it, but those characters are not interpreted correctly.

looking at fonts.rs, i can see only glyphs_width definitons. how can i properly set fonts?

thanks

saethlin commented 5 years ago

This is a back-burner project, so since unicode in PDF is hard I haven't gotten to it and may not for a while. Sorry! There's some explanation on what's hard about it here: https://stackoverflow.com/questions/128162/unicode-in-pdf

If you want to set your own fonts, you'll have to figure out how to use fonts that aren't built into the PDF specification first, which is another reason I haven't gotten to this yet.