diff options
author | Jjgod Jiang <gzjjgod@gmail.com> | 2014-08-04 07:29:06 +0000 |
---|---|---|
committer | Jjgod Jiang <gzjjgod@gmail.com> | 2014-08-04 07:29:06 +0000 |
commit | e93685e85b3f0bff2eb571e79d77dccddd1cb2ed (patch) | |
tree | 67a4291f5b96c2222c138129a1d1148d7ef5a89d /Build/source/texk/dvipdfm-x/cff.c | |
parent | cee6575f0e755c4c15ff886a180e489545cb86ac (diff) |
Fix ToUnicode stream creation for non-subst glyphs
non-subst glyphs generated with Unicode -> CID CMap are now properly
handled by storing the correct GID used and match them with the CMAP
in the fonts.
subst glyphs (the ones when OpenType features have been applied) can
not be found because they are not directly accessible through CMAP.
git-svn-id: svn://tug.org/texlive/trunk@34830 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/cff.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/cff.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Build/source/texk/dvipdfm-x/cff.c b/Build/source/texk/dvipdfm-x/cff.c index 596b1cc4848..f122044b921 100644 --- a/Build/source/texk/dvipdfm-x/cff.c +++ b/Build/source/texk/dvipdfm-x/cff.c @@ -1054,23 +1054,24 @@ card16 cff_glyph_lookup (cff_font *cff, const char *glyph) card16 cff_charsets_lookup (cff_font *cff, card16 cid) { - card16 gid = 0; - cff_charsets *charset; - card16 i; - if (cff->flag & (CHARSETS_ISOADOBE|CHARSETS_EXPERT|CHARSETS_EXPSUB)) { ERROR("Predefined CFF charsets not supported yet"); } else if (cff->charsets == NULL) { ERROR("Charsets data not available"); } + return cff_charsets_lookup_gid(cff->charsets, cid); +} + +card16 cff_charsets_lookup_gid (cff_charsets *charset, card16 cid) +{ + card16 gid = 0; + card16 i; + if (cid == 0) { return 0; /* GID 0 (.notdef) */ } - charset = cff->charsets; - - gid = 0; switch (charset->format) { case 0: for (i = 0; i <charset->num_entries; i++) { |