luahpdf icon indicating copy to clipboard operation
luahpdf copied to clipboard

Is there utf-8 support?

Open ysharoiko opened this issue 5 years ago • 3 comments

ysharoiko avatar May 19 '19 19:05 ysharoiko

This project is based on libharu which unfortunately does not support utf-8. According to the documentation, it does support various character set (ISO8859-1~16, MSCP1250~8, KOI8-R) including CJK fonts and encodings.

jung-kurt avatar May 19 '19 20:05 jung-kurt

Unfortunatly could not find any way to set encoding, maybe it can be done by loading different fonts

I see this result on pdf pdffonts.exe test.pdf Config Error: No display font for 'Symbol' Config Error: No display font for 'ZapfDingbats'

name type emb sub uni prob object ID location

Helvetica-Bold Type 1 no no no 15 0 external: C:\Windows\Fonts\arialbd.ttf Helvetica Type 1 no no no 16 0 external: C:\Windows\Fonts\arial.ttf Courier Type 1 no no no 17 0 external: C:\Windows\Fonts\cour.ttf Courier-Oblique Type 1 no no no 18 0 external: C:\Windows\Fonts\couri.ttf Helvetica-Oblique Type 1 no no no 19 0 external: C:\Windows\Fonts\ariali.ttf

No words about encoding

ysharoiko avatar May 22 '19 08:05 ysharoiko

The font_demo.lua examples shows how to work with the PDF native fonts, including ZapfDingbats. But I have not had luck demonstrating how to use the code page encodings. You may wish to read Encodings and Fonts in the libharu wiki. Also, I had forgotten that there is some support for Unicode and UTF-8, but unfortunately I don't have a good example that shows how to use these from a Lua script. If you have some success, please share your findings!

jung-kurt avatar May 22 '19 12:05 jung-kurt