summaryrefslogtreecommitdiff
path: root/include/mupdf/pdf/cmap.h
AgeCommit message (Collapse)Author
2017-04-18Use splay trees for loading/merging cmaps.Robin Watts
This allows for overlaps, merges adjacent (mergeable) ranges and gets us properly searchable results. This causes 1 diff in the test suites (Bug694353.pdf), which is due to the fallback font not having a hypen present at UCS 0x2010.
2017-01-09Remove some dead code.Tor Andersson
2016-06-08Move to using size_t for all mallocs.Robin Watts
This has knock on effects in the store. fix
2016-06-06Minimize the number of CMaps built in to the ones listed in the spec.Tor Andersson
Omitting the unlisted UTF-8 and UTF-32 CMaps saves ~1M. Omitting the unlisted other CMaps saves ~200k. Define CJK_CMAPS=0 to skip all CMaps. Define EXTRA_CMAPS=1 to include the various other CMaps. Define UTF8_CMAPS=1 and UTF32_CMAPS to include the UTF-8 and UTF-32 CMaps.
2015-12-11Use fz_output instead of FILE* for most of our output needs.Tor Andersson
Use fz_output in debug printing functions. Use fz_output in pdfshow. Use fz_output in fz_trace_device instead of stdout. Use fz_output in pdf-write.c. Rename fz_new_output_to_filename to fz_new_output_with_path. Add seek and tell to fz_output. Remove unused functions like fz_fprintf. Fix typo in pdf_print_obj.
2015-02-17Add ctx parameter and remove embedded contexts for API regularity.Tor Andersson
Purge several embedded contexts: Remove embedded context in fz_output. Remove embedded context in fz_stream. Remove embedded context in fz_device. Remove fz_rebind_stream (since it is no longer necessary). Remove embedded context in svg_device. Remove embedded context in XML parser. Add ctx argument to fz_document functions. Remove embedded context in fz_document. Remove embedded context in pdf_document. Remove embedded context in pdf_obj. Make fz_page independent of fz_document in the interface. We shouldn't need to pass the document to all functions handling a page. If a page is tied to the source document, it's redundant; otherwise it's just pointless. Fix reference counting oddity in fz_new_image_from_pixmap.
2015-02-17Rename fz_close_* and fz_free_* to fz_drop_*.Tor Andersson
Rename fz_close to fz_drop_stream. Rename fz_close_archive to fz_drop_archive. Rename fz_close_output to fz_drop_output. Rename fz_free_* to fz_drop_*. Rename pdf_free_* to pdf_drop_*. Rename xps_free_* to xps_drop_*.
2014-05-13Fix signedness in cmap interface.Tor Andersson
2014-05-10Fix 694698: Support 32-bit values in CMaps.Tor Andersson
Increasing the existing data structure to 32-bit values would bloat the data tables too much. Simplify the data structure and use three separate range tables for lookups -- one with small 16-bit to 16-bit range lookups, one with 32-bit range lookups, and a final one for one-to-many lookups. This loses the range-to-table optimization we had before, but even with the extra ranges this necessitates, the total size of the compiled binary CMap data is smaller than if we were to extend the previous scheme to 32 bits.
2013-11-28Bug 694127: Valgrind fix for pdf_decode_cmapRobin Watts
A poorly formed string can cause us to overrun the end of the buffer. Now we check the end of the string at each stage to avoid this.
2013-06-18Split pdf.h into subheaders.Tor Andersson