diff options
author | Jjgod Jiang <gzjjgod@gmail.com> | 2014-08-09 20:26:41 +0000 |
---|---|---|
committer | Jjgod Jiang <gzjjgod@gmail.com> | 2014-08-09 20:26:41 +0000 |
commit | 0e536590d09e1c58b0521a2a311dcae285f08a59 (patch) | |
tree | fd9662cd5f18003a53dfa03b15f3e577bec5ec80 /Build/source/texk/dvipdfm-x/pdfdev.c | |
parent | 9462cc23f60af7fbd09a40aa7d70346354343fb0 (diff) |
dvipdfm-x: Simplify ToUnicode handling
Remove used_glyphs and its supporting code for ToUnicode handling,
because for CID fonts, glyph id can be looked up from cid which is
stored in used_chars already, it simplified a lot of code and reduced
memory usage.
Continue dedup create_ToUnicode_cmap{4,12}() with
add_to_cmap_if_used().
git-svn-id: svn://tug.org/texlive/trunk@34885 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfdev.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfdev.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfdev.c b/Build/source/texk/dvipdfm-x/pdfdev.c index 2819a3e79af..ec7605a6ab4 100644 --- a/Build/source/texk/dvipdfm-x/pdfdev.c +++ b/Build/source/texk/dvipdfm-x/pdfdev.c @@ -463,7 +463,6 @@ struct dev_font { pdf_obj *resource; char *used_chars; - char *used_glyphs; /* Font format: * simple, composite or bitmap. @@ -877,8 +876,6 @@ dev_set_font (int font_id) if (!real_font->resource) { real_font->resource = pdf_get_font_reference(real_font->font_id); real_font->used_chars = pdf_get_font_usedchars(real_font->font_id); - if (real_font->cff_charsets) - real_font->used_glyphs = pdf_get_font_usedglyphs(real_font->font_id); } if (!real_font->used_on_this_page) { @@ -1158,12 +1155,6 @@ pdf_dev_set_string (spt_t xpos, spt_t ypos, length = instr_len; if (font->format == PDF_FONTTYPE_COMPOSITE) { - if (real_font->used_glyphs != NULL && ctype == -1) { - for (i = 0; i < length; i += 2) { - unsigned short gid = (str_ptr[i] << 8) | str_ptr[i + 1]; - add_to_used_chars2(real_font->used_glyphs, gid); - } - } if (handle_multibyte_string(font, &str_ptr, &length, ctype) < 0) { ERROR("Error in converting input string..."); return; @@ -1171,10 +1162,6 @@ pdf_dev_set_string (spt_t xpos, spt_t ypos, if (real_font->used_chars != NULL) { for (i = 0; i < length; i += 2) { unsigned short cid = (str_ptr[i] << 8) | str_ptr[i + 1]; - if (ctype == 2 && font->cff_charsets) { - unsigned short gid = cff_charsets_lookup_gid(font->cff_charsets, cid); - add_to_used_chars2(real_font->used_glyphs, gid); - } add_to_used_chars2(real_font->used_chars, cid); } } @@ -1549,7 +1536,6 @@ pdf_dev_locate_font (const char *font_name, spt_t ptsize) font->resource = NULL; /* Don't ref obj until font is actually used. */ font->used_chars = NULL; - font->used_glyphs = NULL; font->extend = 1.0; font->slant = 0.0; |