A ToUnicode CMap inside a PDF file shows how to interpret the charcodes into Unicode values.
It may refer to a standard CMap, and add some modification.
Currently those modifications by begin/end bfchar/bfrange in ToUnicode CMaps as parsed and recognized.
However the reference part is not parsed.
In the end of pdf_getcmap in parsepdf.c, it's assumed that the CMap has been fully parsed, and all glyphs have been mapped to correct locations, which is not the case if the ToUnicode CMap only refer to a standard CMap.
What's more, the CMap parsing code in encoding.c is static, I wonder why.
A ToUnicode CMap inside a PDF file shows how to interpret the charcodes into Unicode values.
It may refer to a standard CMap, and add some modification.
Currently those modifications by begin/end bfchar/bfrange in ToUnicode CMaps as parsed and recognized.
However the reference part is not parsed.
In the end of pdf_getcmap in parsepdf.c, it's assumed that the CMap has been fully parsed, and all glyphs have been mapped to correct locations, which is not the case if the ToUnicode CMap only refer to a standard CMap.
What's more, the CMap parsing code in encoding.c is static, I wonder why.