diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-04-13 19:13:59 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-04-18 16:45:49 +0100 |
commit | 670fe1b085fde8355b6d1a70b143eab60e34b1b6 (patch) | |
tree | eca6b0c5e2561a2da269fb9abd1c8d7a9bdeffcb /include | |
parent | a742ac09981f7c681f63f88738e7eded95412599 (diff) | |
download | mupdf-670fe1b085fde8355b6d1a70b143eab60e34b1b6.tar.xz |
Use splay trees for loading/merging cmaps.
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/pdf/cmap.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/mupdf/pdf/cmap.h b/include/mupdf/pdf/cmap.h index 9edeb9d8..d98cd0ab 100644 --- a/include/mupdf/pdf/cmap.h +++ b/include/mupdf/pdf/cmap.h @@ -24,9 +24,11 @@ struct pdf_xrange_s struct pdf_mrange_s { - unsigned int low, len, out[PDF_MRANGE_CAP]; + unsigned int low, out; }; +typedef struct cmap_splay_s cmap_splay; + struct pdf_cmap_s { fz_storable storable; @@ -53,6 +55,13 @@ struct pdf_cmap_s int mlen, mcap; pdf_mrange *mranges; + + int dlen, dcap; + int *dict; + + int tlen, tcap, ttop; + cmap_splay *tree; + }; pdf_cmap *pdf_new_cmap(fz_context *ctx); @@ -80,6 +89,4 @@ pdf_cmap *pdf_load_system_cmap(fz_context *ctx, const char *name); pdf_cmap *pdf_load_builtin_cmap(fz_context *ctx, const char *name); pdf_cmap *pdf_load_embedded_cmap(fz_context *ctx, pdf_document *doc, pdf_obj *ref); -void pdf_print_cmap(fz_context *ctx, fz_output *out, pdf_cmap *cmap); - #endif |