[pdftex] character protrusion problems
RS
w.m.l at gmx.net
Wed Aug 25 17:49:13 CEST 2004
Hi,
I've found some problems with character protrusion. I am using:
This is pdfTeX, Version 3.141592-1.20a-rc7.1 (MiKTeX 2.4)
* The first issue is with some characters not getting protruded into the
right margin. These are: -, --, and ---, when entered like that; when
they occur as \hyphenchar, or as a single character (e.g. \char123),
everything's fine. With the EC fonts, I additionally have problems with
some quote characters.
In both cases, something is being inserted between the character itself
and the right margin by TeX (a \discretionary for the dashes, a \kern
for the quote characters). Might that be a problem?
Here's a plain TeX file showing the problem:
----------------------------------------------------
\tracingoutput 1
\showboxbreadth \maxdimen
\showboxdepth \maxdimen
\pdfprotrudechars=2
\hsize10em
\def\testprotrusion#1{#1\dotfill #1\penalty-10000}
\font\testfont=cmr10\testfont
\newcount\charcount
\charcount=0
\loop
\rpcode\font\charcount=1000
\advance\charcount 1
\ifnum\charcount < 256 \repeat
\noindent
\testprotrusion{A}% OK
\testprotrusion{-}%
\testprotrusion{--}%
\testprotrusion{---}%
\testprotrusion{itworks\-likethis}%
\testprotrusion{\char123}%
\testprotrusion{\char124}%
\font\testfont=ecrm10\testfont
\charcount=0
\loop
\rpcode\font\charcount=1000
\advance\charcount 1
\ifnum\charcount < 256 \repeat
\noindent
%\charcount=0
%\loop
% \testprotrusion{\char\charcount}
% \advance\charcount 1
% \ifnum\charcount < 256 \repeat
\testprotrusion{``}%
\testprotrusion{''}%
\testprotrusion{\char13}% \quotedblbase
\testprotrusion{\char18}% \quotesinglbase
\testprotrusion{Z}% OK
\bye
----------------------------------------------------
* Secondly, pdfTeX will fail on the following LaTeX file:
----------------------------------------------------
\pdfprotrudechars 2
\documentclass{minimal}
\begin{document}
\fontsize{7}{8}\selectfont
This paragraph consists of more than two lines.
This paragraph consists of more than two lines.
This paragraph consists of more than two lines.
%% same here
% This is \hfill an empty line
\end{document}
----------------------------------------------------
pdfTeX will hang while building the paragraph, so it seems.
Somehow, this depend on the fonts preloaded in the format. If I change
the line in preload.ltx:
\DeclarePreloadSizes{OT1}{cmr}{m}{n}{5,7,10}
so that the font for size 10 will be loaded first, and recreate the
format, all seems well. Weird, isn't it?
* Finally, including a pdf file (as a graphic) that contains fonts
which have been created with the autoexpand feature, will make pdftex crash.
Best regards,
Robert.
More information about the pdftex
mailing list