diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/writettf.c | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 4e824f900bf..24378872da5 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,6 @@ +2009-09-16 Han The Thanh <hanthethanh@gmail.com> + * writettf.c: patch for TTC from Liu Yubao <yubao.liu@gmail.com> + 2009-08-12 Karl Berry <karl@tug.org> * pdftex.web (sup_dest_names_size): increase to 500000; diff --git a/Build/source/texk/web2c/pdftexdir/writettf.c b/Build/source/texk/web2c/pdftexdir/writettf.c index 211e750f295..d6711b486c2 100644 --- a/Build/source/texk/web2c/pdftexdir/writettf.c +++ b/Build/source/texk/web2c/pdftexdir/writettf.c @@ -1344,6 +1344,20 @@ void writettf(fd_entry * fd) pdftex_fail("cannot open TrueType font file for reading"); } cur_file_name = (char *) nameoffile + 1; + + /* skip ttc header, prepare for reading first font */ + if (strcasecmp(strchr(cur_file_name, 0) - 4, ".ttc") == 0) { + if (get_ulong() != 0x74746366 /* ttcf */) { + xfseek(INFILE, 0, SEEK_SET, cur_file_name); + } else { + ttf_skip(TTF_FIXED_SIZE); /* ignore the version */ + ttf_skip(TTF_ULONG_SIZE); /* ignore the numFonts */ + + /* goto first font */ + xfseek(INFILE, get_ulong(), SEEK_SET, cur_file_name); + } + } + if (is_subsetted(fd_cur->fm)) tex_printf("<%s", cur_file_name); else |