michaelrsweet/htmldoc

font problem between 1.8.29 and 1.9.12 keeping me from updating my production work

Closed this issue · 16 comments

I am trying to move my production PDF generation to a new server running 1.9.12 and one document type comes out looking different. I think it has something to do with mono-space fonts. Examples of source .html files and resulting .pdf files can be found on "www.pekarske.name/docs/obtuse".

Command is:
CHARTARGS="--webpage --quiet --linkstyle plain --no-links --bodyfont Monospace --embedfonts --fontsize 10 --bottom 5 --top 5 --header "..." --footer "..." --left 36"
htmldoc $CHARTARGS -f CLAN${ROOTBID}.pdf ${CPAG}-*.html >> $PDIR/upd.log

Please note the spacing of the centered text in the two PDFs. files tagged _fax are from 1.8.29 and files tagged _beso3 are from 1.9.12.
I am not very good with fonts, so I hope this is not something trivial, but solving it will be much appreciated by me in any event.

Just found this note in a log file - I suspect it is the problem, but I do not know how to fix it:
**** Error: can't process embedded font stream,
attempting to load the font using its name.
Output may be incorrect.

@BobPekarske What software is producing that error message? The only real changes to the font embedding code between 1.8.x and 1.9.x was the addition of support for UTF-8 (which yields a dynamic 8-bit character encoding in the PDF file vs. one of the canned ISO/Windows charsets).

@BobPekarske No, any HTMLDOC errors will be prefixed with "ERR".

@BobPekarske Can you attach sample PDFs from before and after? 1.9.x does have updated font files (more glyphs) so I’d expect the new PDF to be slightly larger, not smaller.

@BobPekarske OK, I'm able to access those files and am looking at why the 1.9.x output is missing the font data.

Just for completeness - what OS are you using on your server and how did you install HTMLDOC?

@BobPekarske If you don't install, you need to set the HTMLDOC_DATA environment variable to point to the source directory, otherwise it won't be able to find its font files...

@BobPekarske Point it at the main source directory - when installed HTMLDOC will look for files in both the "data" and "font" subdirectories.

@BobPekarske If I run HTMLDOC on my local system (also Ubuntu 20.04 LTS) I get the expected output (with embedded fonts). Try running without the --quiet option - then you'll see any errors and debug output.