[pdftex] More protcode.tex small bugs

Julian Gilbey J.D.Gilbey at qmul.ac.uk
Tue Feb 12 08:45:35 CET 2002


In protcode.tex, there is an assumption that a font identifier will be
either \font or a control sequence defined by \font.  But this may not
be true, for example, \textfont3.  So where the font is passed between
macros, it should be braced:

\def\setprotcode#1{%
    [...]
    \adjustprotcode{#1}
}

[...]
        \loop
            \ifcase\lpcode#1\@tempcnta\else
                \adjustcp\lpcode{#1}\@tempcnta
            \fi
            \ifcase\rpcode#1\@tempcnta\else
                \adjustcp\rpcode{#1}\@tempcnta
            \fi
[...]

\def\adjustcp#1#2#3{%
    \setbox0=\hbox{\the#2\char#3}%
    \@tempcntb=\wd0
    \multiply\@tempcntb #1#2#3%
    \divide\@tempcntb \fontdimen6 #2%
    #1#2#3=\@tempcntb
}
\makeatother


   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

     Julian Gilbey, Dept of Maths,             Debian GNU/Linux Developer
      Queen Mary, Univ. of London         see http://people.debian.org/~jdg/
   http://www.maths.qmul.ac.uk/~jdg/           or http://www.debian.org/
        Visit http://www.thehungersite.com/ to help feed the hungry



More information about the pdftex mailing list