summaryrefslogtreecommitdiff
path: root/gs/base/gdevpdtd.h
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2012-09-13 14:53:15 +0100
committerKen Sharp <ken.sharp@artifex.com>2012-09-13 14:53:15 +0100
commit44d00dd1bd34e2fb735d4682b73d880e208f92bd (patch)
tree36a68a99cfbcfb6c506fec5e5fddb872352d10e8 /gs/base/gdevpdtd.h
parente8cfe956fe45fa949d22b10e2af665506e49fde4 (diff)
downloadghostpdl-44d00dd1bd34e2fb735d4682b73d880e208f92bd.tar.gz
pdfwrite - improve subset font prefix generation
We generate the prefix for a subset font by creating a hash from the usage pattern of glyphs in a font. If the font was already subset, and 'compact' (ie glyphs are used in order from 1 to n), then it was possible to generate the same prefix for two differetn subsets of the same font. In fact this is always possible, but here we add a heuristic which uses the MD5 hash we create for stream objects as an additional hash when generating the subset prefix. This does not guarantee that name collisions won't occur but should reduce the incidence still further. No differences expected.
Diffstat (limited to 'gs/base/gdevpdtd.h')
-rw-r--r--gs/base/gdevpdtd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gs/base/gdevpdtd.h b/gs/base/gdevpdtd.h
index b48089142..0ad885f3f 100644
--- a/gs/base/gdevpdtd.h
+++ b/gs/base/gdevpdtd.h
@@ -104,6 +104,8 @@ bool pdf_font_descriptor_is_subset(const pdf_font_descriptor_t *pfd);
*/
gs_string *pdf_font_descriptor_name(pdf_font_descriptor_t *pfd);
+char *pdf_fontfile_hash(void *pfd);
+
/*
* Return the (copied, subset or complete) font associated with a FontDescriptor.
* This procedure probably shouldn't exist....