diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-09-17 07:36:47 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-09-17 07:36:47 +0000 |
commit | ec1b55e58ef1767afd329c2e44ebdea8fe502f89 (patch) | |
tree | adfc94d7e4701db4efd00e929bd152d74d90d531 /Build/source/texk/web2c/omegaware/ofm2opl.web | |
parent | f83ff5e42379a04ed7d13704e1baff7ef5cedb81 (diff) |
Version 1.12 of omegaware font programs
git-svn-id: svn://tug.org/texlive/trunk@15332 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/omegaware/ofm2opl.web')
-rw-r--r-- | Build/source/texk/web2c/omegaware/ofm2opl.web | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/Build/source/texk/web2c/omegaware/ofm2opl.web b/Build/source/texk/web2c/omegaware/ofm2opl.web index d18931fd3a9..7ad21791472 100644 --- a/Build/source/texk/web2c/omegaware/ofm2opl.web +++ b/Build/source/texk/web2c/omegaware/ofm2opl.web @@ -21,6 +21,8 @@ % Version 3.1 (November 1989) renamed z[] to lig_z[] for better portability. % Version 1.0 of OFM2OPL (December 1995) allows one to read OFM files. +% Version 1.11 (February 2000). +% Version 1.12 (September 2009) various bug fixes by Peter Breitenlohner. % Here is TeX material that gets inserted after \input webmac \def\hang{\hangindent 3em\indent\ignorespaces} @@ -39,7 +41,7 @@ \vfill \centerline{\titlefont The {\ttitlefont OFM2OPL} processor} \vskip 15pt - \centerline{(Version 1.11, February 2000)} + \centerline{(Version 1.12, September 2009)} \vfill} \def\botofcontents{\vfill \centerline{\hsize 5in\baselineskip9pt @@ -81,7 +83,7 @@ and \.{OPL} files. The |banner| string defined here should be changed whenever \.{OFM2OPL} gets modified. -@d banner=='This is OFM2OPL, Version 1.11' +@d banner=='This is OFM2OPL, Version 1.12' @ This program is written entirely in standard \PASCAL, except that it occasionally has lower case letters in strings that are output. @@ -195,7 +197,7 @@ This is called BigEndian order. @<Glob...@>= @!ofm_level, @!nco,@!ncw,@!npc,@!nki,@!nwi,@!nkf,@!nwf,@!nkr,@!nwr,@!nkg,@!nwg,@!nkp,@!nwp, -@!nkm,@!nwm,@!real_lf, +@!nkm,@!nwm,@!real_lf,@!nlw,@!neew, @!lf,@!lh,@!bc,@!ec,@!nw,@!nh,@!nd,@!ni,@!nl,@!nk,@!ne,@!np,@!font_dir:integer; {subfile sizes} @!ofm_on:boolean; @@ -497,7 +499,11 @@ if lf=0 then begin read(tfm_file, tfm[i]); end; ofm_on := true; ofm_level := tfm[2]*@"100+tfm[3]; + if ofm_level>1 then + abort('OFMLEVEL ',ofm_level:1,' not supported, must be 0 or 1!'); +@.OFMLEVEL...must be 0 or 1@> if tfm[4]>127 then abort('The fifth byte of the input file exceeds 127!'); +@.The fifth byte...@> lf := tfm[4]*@"1000000 + tfm[5]*@"10000 + tfm[6]*@"100 + tfm[7]; end else @@ -563,6 +569,8 @@ if not ofm_on then begin eval_two_bytes(ne); eval_two_bytes(np); ncw:=(ec-bc+1); + nlw:=nl; + neew:=ne; header_length:=6; top_char:=255; top_width:=255; @@ -584,6 +592,8 @@ else begin eval_four_bytes(ne); eval_four_bytes(np); eval_four_bytes(font_dir); + nlw:=2*nl; + neew:=2*ne; top_char:=65535; top_width:=65535; top_height:=255; @@ -612,13 +622,13 @@ else begin eval_four_bytes(nwp); {Words of font penalties} end; end; -if lf<>(header_length+lh+ncw+nw+nh+nd+ni+2*nl+nk+2*ne+np+ +if lf<>(header_length+lh+ncw+nw+nh+nd+ni+nlw+nk+neew+np+ nki+nwi+nkf+nwf+nkm+nwm+nkr+nwr+nkg+nwg+nkp+nwp) then abort('Subfile sizes don''t add up to the stated total!'); @.Subfile sizes don't add up...@> if lh<2 then abort('The header length is only ',lh:1,'!'); @.The header length...@> -if (2*nl)>(4*lig_size) then +if nl>4*lig_size then abort('The lig/kern program is longer than I can handle!'); @.The lig/kern program...@> if (bc>ec+1)or(ec>top_char) then abort('The character code range ', @@ -698,9 +708,9 @@ height_base:=width_base+nw; depth_base:=height_base+nh; italic_base:=depth_base+nd; lig_kern_base:=italic_base+ni; -kern_base:=lig_kern_base+2*nl; +kern_base:=lig_kern_base+nlw; exten_base:=kern_base+nk; -param_base:=exten_base+2*ne-1; +param_base:=exten_base+neew-1; end @ Of course we want to define macros that suppress the detail of how the @@ -743,8 +753,6 @@ end; function italic_index(c:char_type):integer; begin if not ofm_on then italic_index:=tfm[char_info(c)+2] div 4 -else if ofm_level=0 then - italic_index:=tfm[char_info(c)+4]*64 + tfm[char_info(c)+5] div 4 else italic_index:=tfm[char_info(c)+4]; end; @@ -1341,9 +1349,15 @@ the \.{TFM} file; the stated value is merely put into the \.{PL} file. The \.{PLtoTF} program will store a correct value and give a warning message if a file falsely claims to be safe. +\.{OFM} files are assumed to be seven-bit-unsafe. + @<Output the |seven_bit_safe_flag|@>= -begin left; out('SEVENBITSAFEFLAG FALSE'); right; -end +if ofm_on then + begin left; out('SEVENBITSAFEFLAG FALSE'); right; + end +else if (lh>17) and (tfm[random_word]>127) then + begin left; out('SEVENBITSAFEFLAG TRUE'); right; + end @ The next thing to take care of is the list of parameters. @@ -1756,7 +1770,7 @@ for clabel_runner:=0 to 256 do @ @<Output any labels...@>= while i=label_table[sort_ptr].rr do begin - if not label_table[sort_ptr].ischar then begin + if label_table[sort_ptr].cc<>xmax_char and not label_table[sort_ptr].ischar then begin if not output_clabels[label_table[sort_ptr].cc] then begin output_clabels[label_table[sort_ptr].cc]:=true; left; @@ -2303,8 +2317,10 @@ do_characters; print_ln('.');@/ if level<>0 then print_ln('This program isn''t working!'); @.This program isn't working@> if not perfect then - out('(COMMENT THE OFM FILE WAS BAD, SO THE DATA HAS BEEN CHANGED!)'); + begin out('(COMMENT THE OFM FILE WAS BAD, SO THE DATA HAS BEEN CHANGED!)'); @.THE OFM FILE WAS BAD...@> + write_ln(pl_file); + end; final_end:end. @* System-dependent changes. |