summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/vftovp.web
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-01-20 11:01:30 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-01-20 11:01:30 +0000
commit7b16d3b1d6a8cb9b23b012e4527ee5d9e061aa04 (patch)
treec3765a705ff191a5f3ae7e367c4c7bb73ef2d083 /Build/source/texk/web2c/vftovp.web
parent822e7e612de859b23a6aa03e2ce575696afd84c6 (diff)
TeX & Co: New versions from Knuth (TeX tuneup of 2014)
git-svn-id: svn://tug.org/texlive/trunk@32727 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/vftovp.web')
-rw-r--r--Build/source/texk/web2c/vftovp.web29
1 files changed, 17 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/vftovp.web b/Build/source/texk/web2c/vftovp.web
index 73c0024ccf6..0abfdbefc18 100644
--- a/Build/source/texk/web2c/vftovp.web
+++ b/Build/source/texk/web2c/vftovp.web
@@ -3,6 +3,8 @@
% Version 1.1 fixed problems of strict Pascal (April 1990).
% Version 1.2 fixed various bugs found by Peter Breitenlohner (September 1990).
% Version 1.3 made out_as_fix tell the truth in overflow cases (Dec 2002).
+% Version 1.4 reports out-of-range characters (Breitenlohner, Jan 2014),
+% and tests nl>lig_size not 4*lig_size (C. M. Connelly, Melissa O'Neill).
% Here is TeX material that gets inserted after \input webmac
\def\hang{\hangindent 3em\indent\ignorespaces}
@@ -21,7 +23,7 @@
\vfill
\centerline{\titlefont The {\ttitlefont VFtoVP} processor}
\vskip 15pt
- \centerline{(Version 1.3, December 2002)}
+ \centerline{(Version 1.4, January 2014)}
\vfill}
\def\botofcontents{\vfill
\centerline{\hsize 5in\baselineskip9pt
@@ -56,7 +58,7 @@ called \.{AMFtoXPL}.
The |banner| string defined here should be changed whenever \.{VFtoVP}
gets modified.
-@d banner=='This is VFtoVP, Version 1.3' {printed when the program starts}
+@d banner=='This is VFtoVP, Version 1.4' {printed when the program starts}
@ This program is written entirely in standard \PASCAL, except that
it occasionally has lower case letters in strings that are output.
@@ -143,7 +145,7 @@ purposes, when fonts designed for one output device are unavailable on another.
@ A \.{VF} file is organized as a stream of 8-bit bytes, using conventions
borrowed from \.{DVI} and \.{PK} files. Thus, a device driver that knows
about \.{DVI} and \.{PK} format will already
-contain most of the mechanisms necessary to process \.{VF} files.
+contain most of the mechanisms necessary to process \.{VF} files.
We shall assume that \.{DVI} format is understood; the conventions in the
\.{DVI} documentation (see, for example, {\sl \TeX: The Program}, part 31)
are adopted here to define \.{VF} format.
@@ -187,7 +189,7 @@ is a |fix_word| relative to the design size of the virtual font.
Thus if the local font is to be used at the same size
as the design size of the virtual font itself, |s| will be the
integer value $2^{20}$. The value of |s| must be positive and less than
-$2^{24}$ (thus less than 16 when considered as a |fix_word|).
+$2^{24}$ (thus less than 16 when considered as a |fix_word|).
The dimension~|d| is a |fix_word| in units of printer's points; hence it
is identical to the design size found in the corresponding \.{TFM} file.
@@ -642,12 +644,12 @@ eval_two_bytes(ne);
eval_two_bytes(np);
if lh<2 then abort('The header length is only ',lh:1,'!');
@.The header length...@>
-if nl>4*lig_size then
+if nl>lig_size then
abort('The lig/kern program is longer than I can handle!');
@.The lig/kern program...@>
if (bc>ec+1)or(ec>255) then abort('The character code range ',
@.The character code range...@>
- bc:1,'..',ec:1,'is illegal!');
+ bc:1,'..',ec:1,' is illegal!');
if (nw=0)or(nh=0)or(nd=0)or(ni=0) then
abort('Incomplete subfiles for character dimensions!');
@.Incomplete subfiles...@>
@@ -838,7 +840,7 @@ if vf[vf_ptr-10]>0 then {|s| is negative or exceeds $2^{24}-1$}
a:=vf[vf_ptr-2]; l:=vf[vf_ptr-1]; vf_store(a+l); {|n[a+l]|}
@<Print the name of the local font@>;
@<Read the local font's \.{TFM} file and record the characters it contains@>;
-incr(font_ptr); font_start[font_ptr]:=vf_ptr;
+incr(font_ptr); font_start[font_ptr]:=vf_ptr;
end
@ The font area may need to be separated from the font name on some systems.
@@ -2169,7 +2171,7 @@ push:begin if top=max_stack then
incr(top); wstack[top]:=wstack[top-1]; xstack[top]:=xstack[top-1];
ystack[top]:=ystack[top-1]; zstack[top]:=zstack[top-1]; out('(PUSH)');
out_ln;
- end;
+ end;
pop:if top=0 then bad_vf('More pops than pushes!')
@.More pops than pushes@>
else begin decr(top); out('(POP)'); out_ln;
@@ -2218,10 +2220,13 @@ sixty_four_cases(fnt_num_0),four_cases(fnt1):begin f:=0;
@<Cases...@>=
sixty_four_cases(set_char_0),sixty_four_cases(set_char_0+64),
four_cases(set1),four_cases(put1):begin if o>=set1 then
- if o>=put1 then c:=get_bytes(o-put1+1,false)
- else c:=get_bytes(o-set1+1,false)
- else c:=o;
- if f=font_ptr then
+ if o>=put1 then k:=get_bytes(o-put1+1,false)
+ else k:=get_bytes(o-set1+1,false)
+ else k:=o;
+ c:=k;
+ if (k<0)or(k>255) then
+ bad_vf('Character ',k:1,' is out of range and will be ignored')
+ else if f=font_ptr then
bad_vf('Character ',c:1,' in undeclared font will be ignored')
@.Character...will be ignored@>
else begin vf[font_start[f+1]-1]:=c; {store |c| in the ``hole'' we left}