diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-03-14 17:52:17 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-03-16 14:51:41 +0100 |
commit | 2612c20b725319833caeef36ccf4240f34e0e24b (patch) | |
tree | eb58090f9a78187690bc5197b11284576a50b8c3 /source/pdf/pdf-resources.c | |
parent | 5a2b234c8e93a2c3acdb21e79da684dbcfe677c7 (diff) | |
download | mupdf-2612c20b725319833caeef36ccf4240f34e0e24b.tar.xz |
Add simple CJK font creation.
Create a non-embedded CJK font using UTF-16 encoding. This can be used
in mutool create like so:
%%CJKFont Ming GB1
BT
/Ming 10 Tf
100 100 Td
<4F60 597D> Tj
ET
Diffstat (limited to 'source/pdf/pdf-resources.c')
-rw-r--r-- | source/pdf/pdf-resources.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/pdf/pdf-resources.c b/source/pdf/pdf-resources.c index 72adf081..720ee2b1 100644 --- a/source/pdf/pdf-resources.c +++ b/source/pdf/pdf-resources.c @@ -109,7 +109,7 @@ pdf_insert_image_resource(fz_context *ctx, pdf_document *doc, unsigned char dige * it may be more problematic. */ pdf_obj * -pdf_find_font_resource(fz_context *ctx, pdf_document *doc, int type, fz_buffer *item, unsigned char digest[16]) +pdf_find_font_resource(fz_context *ctx, pdf_document *doc, int type, int encoding, fz_buffer *item, unsigned char digest[16]) { fz_md5 state; unsigned char *data; @@ -124,6 +124,7 @@ pdf_find_font_resource(fz_context *ctx, pdf_document *doc, int type, fz_buffer * /* Create md5 and see if we have the item in our table */ fz_md5_init(&state); fz_md5_update(&state, (unsigned char*)&type, sizeof type); + fz_md5_update(&state, (unsigned char*)&encoding, sizeof encoding); fz_md5_update(&state, data, size); fz_md5_final(&state, digest); |