diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-10-09 22:15:08 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-10-09 22:15:08 +0000 |
commit | f474ea6b480e990510e5543a14698204d428c900 (patch) | |
tree | 0cde40b29d404299d6ce9aeae102c664749750da /Build | |
parent | 5b376f63d3154567a75cf4bb7ec07f31f7f124a7 (diff) |
web2c/luatexdir: Sync with the upstream.
git-svn-id: svn://tug.org/texlive/trunk@38604 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/font/luatexfont.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/font/writetype2.w | 21 |
3 files changed, 12 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 48eaa4bcbca..4998e8413a1 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,6 +1,7 @@ 2015-10-09 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * luatex.c: Sync with the upstream. + * font/luatexfont.h, font/writetype2.w: Sync with the upstream. 2015-10-08 Akira Kakuto <kakuto@fuk.kindai.ac.jp> diff --git a/Build/source/texk/web2c/luatexdir/font/luatexfont.h b/Build/source/texk/web2c/luatexdir/font/luatexfont.h index fba411ac774..d296780063d 100644 --- a/Build/source/texk/web2c/luatexdir/font/luatexfont.h +++ b/Build/source/texk/web2c/luatexdir/font/luatexfont.h @@ -179,7 +179,7 @@ extern unsigned long cidtogid_obj; pdf_obj *pdf_new_stream(void); void pdf_add_stream(pdf_obj * stream, unsigned char *buf, long len); void pdf_release_obj(pdf_obj * stream); -unsigned long ttc_read_offset(sfnt * sfont, int ttc_idx); +unsigned long ttc_read_offset(sfnt * sfont, int ttc_idx, fd_entry *fd); /* subfont.c */ void sfd_free(void); diff --git a/Build/source/texk/web2c/luatexdir/font/writetype2.w b/Build/source/texk/web2c/luatexdir/font/writetype2.w index f218d0f94bd..618d1b5ce77 100644 --- a/Build/source/texk/web2c/luatexdir/font/writetype2.w +++ b/Build/source/texk/web2c/luatexdir/font/writetype2.w @@ -172,11 +172,11 @@ boolean writetype2(PDF pdf, fd_entry * fd) fd_cur->ff_found = true; - if (is_subsetted(fd_cur->fm)) + if (is_subsetted(fd_cur->fm)) report_start_file(filetype_subset,cur_file_name); - else + else report_start_file(filetype_font,cur_file_name); - + /* here is the real work */ ret = make_tt_subset(pdf, fd, ttf_buffer, ttf_size); @@ -184,9 +184,9 @@ boolean writetype2(PDF pdf, fd_entry * fd) xfree (dir_tab); #endif xfree(ttf_buffer); - if (is_subsetted(fd_cur->fm)) + if (is_subsetted(fd_cur->fm)) report_stop_file(filetype_subset); - else + else report_stop_file(filetype_font); cur_file_name = NULL; return ret; @@ -234,7 +234,7 @@ static struct { }; -unsigned long ttc_read_offset(sfnt * sfont, int ttc_idx) +unsigned long ttc_read_offset(sfnt * sfont, int ttc_idx, fd_entry * fd) { //ULONG version; unsigned long offset = 0; @@ -245,8 +245,9 @@ unsigned long ttc_read_offset(sfnt * sfont, int ttc_idx) /*version = */(void)sfnt_get_ulong(sfont); num_dirs = sfnt_get_ulong(sfont); if (ttc_idx < 0 || ttc_idx > (int) (num_dirs - 1)) { - fprintf(stderr, "Invalid TTC index number\n"); - uexit(1); + fprintf(stderr, "Invalid TTC index number %i (0..%i), using index 0 for font %s\n", + ttc_idx,(int) (num_dirs - 1),(fd->fm->ps_name ? fd->fm->ps_name : "")); + return 0 ; } sfnt_seek_set(sfont, 12 + ttc_idx * 4); offset = sfnt_get_ulong(sfont); @@ -278,9 +279,7 @@ boolean make_tt_subset(PDF pdf, fd_entry * fd, unsigned char *buff, int buflen) if (sfont->type == SFNT_TYPE_TTC) { i = ff_get_ttc_index(fd->fm->ff_name, fd->fm->ps_name); - tex_printf("(%s:%ld)", (fd->fm->ps_name ? fd->fm->ps_name : ""), i); - error = - sfnt_read_table_directory(sfont, ttc_read_offset(sfont, (int) i)); + error = sfnt_read_table_directory(sfont, ttc_read_offset(sfont, (int) i, fd)); } else { error = sfnt_read_table_directory(sfont, 0); } |