Potentially erroneous CID-GID mapping created by LuaTeX

Simon Dierl simon.dierl at cs.tu-dortmund.de
Mon Mar 25 00:30:14 CET 2019


Hi,

I hope this is the correct place to report issues with TeXLive's
Lua(La)TeX -- if not, I would be grateful to be redirected to an
appropriate venue! If it is, however, read on...

When attempting to create PDF/A-3a compliant PDFs using LuaLaTeX, after
some configuration, VeraPDF [1] (an open source PDF/A compliance
checker) only flagged a single issue, namely a violation of clause
6.2.11.4 in the ISO 19005-3:2012 specification. The spec demands that a
subfont's CIDSet must -- if present -- match the CIDs mapped in the
CID-to-GID mapping.

After some debugging, I discovered that LuaTeX always maps CID 0 to GID
0 in the created PDF; however, the CIDSet writing code (writecff.c)
explicitly excludes CID 0 from being marked in the CIDSet. Modifying
the loops to include CID 0 into the CIDSet [2] creates a compliant PDF,
as does disabling CIDSet writing altogether [3].

Inspecting the PDF (using a debugger to inspect VeraPDFs internal state
[4]) shows that the CIDSet only contains CID 115, while the CID-GID
mapping contains 0->0 and 115->1. The 0->0 mapping is present for every
font written by LuaLaTeX for documents using more than one font.

Since I do not know if the 0->0 mapping serves any technical purpose, I
am not certain how to correctly resolve this issue; I suspect that
either the mapping should be fixed or the CIDSet should be corrected.
See [5] for a MWE demonstrating the issue. The issue can be reproduced
using versions 1.07.0 (tl 2018) and 1.10.0 (tlpretest 2019). It also
occurs for the PDF/A-2a compliance level. PDF/A-1a and all PDF/A-*b
levels do not demand CIDSet completeness; the created PDFs are
compliant.

Regards
Simon

[1] https://verapdf.org/
[2] see attachment: writecff.patch
[3] \directlua{pdf.setomitcidset(1)}
[4] for jdb, use the following commands:
 stop at org.verapdf.gf.model.impl.pd.font.GFPDCIDFont:149
 resume
 print bitSet
 print cidFont.font.charSet
[5] see attchement: pdf-a-test.tex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: writecff.patch
Type: text/x-patch
Size: 1101 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20190325/437a7dca/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdf-a-test.tex
Type: text/x-tex
Size: 254 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20190325/437a7dca/attachment-0001.bin>


More information about the tex-live mailing list