Frank Küster wrote:
Jie Luo
wrote: Hi,
I modified you patch to get it apply to tetex-3.0_p1, and change font_max back to 2000 in texmf.cnf. Everything is fine now. Thank you very much for patch.
Ah, great - can you publish this modified patch?
Thanks in advance, Frank
Attached. Jie diff -urN tetex-src-3.0/texk/web2c/pdftexdir/hz.ch tetex-src-3.0.new/texk/web2c/pdftexdir/hz.ch --- tetex-src-3.0/texk/web2c/pdftexdir/hz.ch 2005-12-06 23:04:25.000000000 +0800 +++ tetex-src-3.0.new/texk/web2c/pdftexdir/hz.ch 2006-11-23 11:13:55.760977765 +0800 @@ -396,7 +396,7 @@ pdf_font_expand_ratio[k] := e; pdf_font_step[k] := pdf_font_step[f]; pdf_font_auto_expand[k] := pdf_font_auto_expand[f]; - pdf_font_blink[k] := f; {???} + pdf_font_blink[k] := f; pdf_font_lp_base[k] := pdf_font_lp_base[f]; pdf_font_rp_base[k] := pdf_font_rp_base[f]; pdf_font_ef_base[k] := pdf_font_ef_base[f]; @@ -467,6 +467,7 @@ e := pdf_font_expand_ratio[f]; for k := 0 to vf_local_font_num[bf] - 1 do begin lf := vf_default_font[bf] + k; + allocvffnts; vf_e_fnts[vf_nf] := vf_e_fnts[lf]; vf_i_fnts[vf_nf] := auto_expand_font(vf_i_fnts[lf], e); set_expand_param(vf_i_fnts[vf_nf], vf_i_fnts[lf], e); diff -urN tetex-src-3.0/texk/web2c/pdftexdir/pdftex.ch tetex-src-3.0.new/texk/web2c/pdftexdir/pdftex.ch --- tetex-src-3.0/texk/web2c/pdftexdir/pdftex.ch 2005-12-06 23:04:25.000000000 +0800 +++ tetex-src-3.0.new/texk/web2c/pdftexdir/pdftex.ch 2006-11-23 11:07:10.780656355 +0800 @@ -2491,6 +2491,7 @@ cmd := vf_byte; save_vf_nf := vf_nf; while (cmd >= fnt_def1) and (cmd <= fnt_def1 + 3) do begin + allocvffnts; vf_e_fnts[vf_nf] := vf_read(cmd - fnt_def1 + 1); vf_i_fnts[vf_nf] := vf_def_font(f); incr(vf_nf); diff -urN tetex-src-3.0/texk/web2c/pdftexdir/pdftex.defines tetex-src-3.0.new/texk/web2c/pdftexdir/pdftex.defines --- tetex-src-3.0/texk/web2c/pdftexdir/pdftex.defines 2005-12-06 23:04:25.000000000 +0800 +++ tetex-src-3.0.new/texk/web2c/pdftexdir/pdftex.defines 2006-11-23 11:03:46.722780867 +0800 @@ -63,7 +63,7 @@ @define procedure setjobid(); @define procedure unescapehex(); @define procedure writestreamlength(); - +@define procedure allocvffnts; { functions from vfpacket.c } @define function newvfpacket(); diff -urN tetex-src-3.0/texk/web2c/pdftexdir/utils.c tetex-src-3.0.new/texk/web2c/pdftexdir/utils.c --- tetex-src-3.0/texk/web2c/pdftexdir/utils.c 2005-12-06 23:04:26.000000000 +0800 +++ tetex-src-3.0.new/texk/web2c/pdftexdir/utils.c 2006-11-23 11:19:21.667685137 +0800 @@ -51,7 +51,15 @@ /* define char_ptr, char_array & char_limit */ typedef char char_entry; -define_array(char); +define_array(char); + +/* define vf_e_fnts_ptr, vf_e_fnts_array & vf_e_fnts_limit */ +typedef integer vf_e_fnts_entry; +define_array (vf_e_fnts); + +/* define vf_i_fnts_ptr, vf_i_fnts_array & vf_i_fnts_limit */ +typedef internalfontnumber vf_i_fnts_entry; +define_array (vf_i_fnts); integer fb_offset(void) { @@ -1143,3 +1151,23 @@ *q = '\0'; return name; } + +void allocvffnts(void) +{ + if (vf_e_fnts_array == NULL) { + vf_e_fnts_array = vfefnts; + vf_e_fnts_limit = fontmax; + vf_e_fnts_ptr = vf_e_fnts_array; + vf_i_fnts_array = vfifnts; + vf_i_fnts_limit = fontmax; + vf_i_fnts_ptr = vf_i_fnts_array; + } + alloc_array(vf_e_fnts, 1, fontmax); + vf_e_fnts_ptr++; + alloc_array(vf_i_fnts, 1, fontmax); + vf_i_fnts_ptr++; + if (vf_e_fnts_array != vfefnts) { + vfefnts = vf_e_fnts_array; + vfifnts = vf_i_fnts_array; + } +}