diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-02-03 21:33:11 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-02-03 21:33:11 +0000 |
commit | 85a5ab00705446693e236ee78a0be10f53e86377 (patch) | |
tree | dcc942a92ffb98bbb2731f58fa069a46a18f9dcb /Build/source/texk/web2c/luatexdir/pdf | |
parent | b14c66510e21d60854c376a6d8cdfb3c48f5e2b8 (diff) |
luatexdir: sync with the upstream (1.0.3)
git-svn-id: svn://tug.org/texlive/trunk@43128 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/pdf')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfgen.w | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w | 14 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdflistout.w | 24 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdftables.h | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdftypes.h | 1 |
5 files changed, 31 insertions, 13 deletions
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w index 2b081e21e03..023f7fd65a3 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w @@ -2269,6 +2269,7 @@ void finish_pdf_file(PDF pdf, int luatexversion, str_number luatexrevision) } } pdf->gen_tounicode = pdf_gen_tounicode; + pdf->omit_cidset = pdf_omit_cidset; k = pdf->head_tab[obj_type_font]; while (k != 0) { int f = obj_info(pdf, k); diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w b/Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w index a1059828938..06755a54bdf 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfglyph.w @@ -199,6 +199,17 @@ void pdf_place_glyph(PDF pdf, internal_font_number f, int c, int ex) scaledpos pos = pdf->posstruct->pos; if (!char_exists(f, c)) return; + if (font_writingmode(f) == vertical_writingmode) { + if (p->wmode != WMODE_V) { + p->wmode = WMODE_V; + p->need_tm = true; + } + } else { + if (p->wmode != WMODE_H) { + p->wmode = WMODE_H; + p->need_tm = true; + } + } if (p->need_tf || f != pdf->f_cur || p->f_pdf != p->f_pdf_cur || p->fs.m != p->fs_cur.m || is_pagemode(p)) { pdf_goto_textmode(pdf); setup_fontparameters(pdf, f, ex); @@ -210,7 +221,8 @@ void pdf_place_glyph(PDF pdf, internal_font_number f, int c, int ex) /* all movements */ move = calc_pdfpos(p, pos); /* within text or chararray or char mode */ if (move || p->need_tm) { - if (p->need_tm || (p->wmode == WMODE_H && (p->pdf_bt_pos.v.m + p->tm[5].m) != p->pdf.v.m) + if (p->need_tm + || (p->wmode == WMODE_H && (p->pdf_bt_pos.v.m + p->tm[5].m) != p->pdf.v.m) || (p->wmode == WMODE_V && (p->pdf_bt_pos.h.m + p->tm[4].m) != p->pdf.h.m) || abs(p->tj_delta.m) >= 1000000) { pdf_goto_textmode(pdf); diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdflistout.w b/Build/source/texk/web2c/luatexdir/pdf/pdflistout.w index 8c5abad5302..53ed24af64a 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdflistout.w +++ b/Build/source/texk/web2c/luatexdir/pdf/pdflistout.w @@ -437,6 +437,18 @@ cur.h += x_advance(p); } } break; + case math_node: + if (synctex) { + synctexmath(p, this_box); + } + /* begin mathskip code */ + if (glue_is_zero(p)) { + cur.h += surround(p); + break; + } else { + /* fall through: mathskip */ + } + /* end mathskip code */ case glue_node: { /* move right or output leaders, we use real multiplication */ @@ -646,18 +658,6 @@ cur.h += x_advance(p); out_what(pdf, p); } break; - case math_node: - if (synctex) { - synctexmath(p, this_box); - } - /* begin mathskip code */ - if (glue_is_zero(p)) { - cur.h += surround(p); - break; - } else { - /* fall through: mathskip */ - } - /* end mathskip code */ case margin_kern_node: cur.h += width(p); break; diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdftables.h b/Build/source/texk/web2c/luatexdir/pdf/pdftables.h index d36f6e611a9..9a14d65da45 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdftables.h +++ b/Build/source/texk/web2c/luatexdir/pdf/pdftables.h @@ -137,6 +137,7 @@ typedef enum { c_pdf_gen_tounicode, c_pdf_pk_fixed_dpi, c_pdf_suppress_optional_info, + c_pdf_omit_cidset, } pdf_backend_counters ; typedef enum { @@ -182,6 +183,7 @@ extern int pdf_retval; # define pdf_gen_tounicode get_tex_extension_count_register(c_pdf_gen_tounicode) # define pdf_pk_fixed_dpi get_tex_extension_count_register(c_pdf_pk_fixed_dpi) # define pdf_suppress_optional_info get_tex_extension_count_register(c_pdf_suppress_optional_info) +# define pdf_omit_cidset get_tex_extension_count_register(c_pdf_omit_cidset) # define pdf_h_origin get_tex_extension_dimen_register(d_pdf_h_origin) # define pdf_v_origin get_tex_extension_dimen_register(d_pdf_v_origin) @@ -201,6 +203,8 @@ extern int pdf_retval; # define set_pdf_minor_version(i) set_tex_extension_count_register(c_pdf_minor_version,i) # define set_pdf_compress_level(i) set_tex_extension_count_register(c_pdf_compress_level,i) # define set_pdf_obj_compress_level(i) set_tex_extension_count_register(c_pdf_obj_compress_level,i) +# define set_pdf_omit_cidset(i) set_tex_extension_count_register(c_pdf_omit_cidset,i) +# define set_pdf_gen_tounicode(i) set_tex_extension_count_register(c_pdf_gen_tounicode,i) # define set_pdf_decimal_digits(i) set_tex_extension_count_register(c_pdf_decimal_digits,i) # define set_pdf_pk_resolution(i) set_tex_extension_count_register(c_pdf_pk_resolution,i) diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h b/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h index 71f843e00f3..34153600d97 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h +++ b/Build/source/texk/web2c/luatexdir/pdf/pdftypes.h @@ -291,6 +291,7 @@ typedef struct pdf_output_file_ { int pk_fixed_dpi; int decimal_digits; int gen_tounicode; + int omit_cidset; int inclusion_copy_font; int minor_version; /* fixed minor part of the PDF version */ int compress_level; /* level for zlib object stream compression */ |