Forum Bugs

Unicode fallback behavior change from Prince 20160109

jaredculp
Hello!

When running the following code:

/usr/local/bin/prince --input=xml --no-subset-fonts --structured-log=buffered --no-system-fonts --xinclude $(fonts) --css-dpi=72 input.html -o output.pdf


We have a unicode character (U+FFFD) which is causing fallback:
L 6�7


On older versions of prince this falls back to '?'. On newer versions it falls back to 'U+25A1' which gives us a no fonts available error.

Prince: Prince 10 rev 7
Copyright 2002-2016 YesLogic Pty. Ltd.
CSO License
msg|wrn||no glyphs for character U+FFFD, fallback to '?'
fin|success

Prince: Prince 20160109
Copyright 2002-2015 YesLogic Pty. Ltd.
CSO License
msg|wrn||no glyphs for character U+FFFD, fallback to '?'
fin|success

Prince: Prince 11.4
Copyright 2002-2017 YesLogic Pty. Ltd.
CSO License
msg|wrn|page 1|no font for Specials character U+FFFD, fallback to U+25A1
msg|err||no available fonts

Prince: Prince 12.5
Copyright 2002-2019 YesLogic Pty. Ltd.
CSO License
msg|wrn|page 1|no font for Specials character U+FFFD, fallback to U+25A1
msg|err||no available fonts


Is there a specific flag we can pass starting in Prince 11.4 and beyond that would emulate the fallback behavior from the Prince 20160109 build?

Thanks in advance.
mikeday
At the moment there is no way to customise this glyph fallback behaviour, but you could use text-replace with this CSS:
* { prince-text-replace: '\FFFD' '?' }
jaredculp
Thanks for the suggestion mikeday. Can you also confirm that the fallback functionality changed between Prince 20160109 and Prince 11.4?
skingsland
To add to what Jared said, the "20160109" build we're using is the one that you provided to Yiqiu here:
https://www.princexml.com/forum/topic/3245/transparent-image-and-page-group-colorspace#15886
mikeday
Yes, the change was made in March 2016.