[ pdftex-Bugs-115 ] character protrusion: some characters will not be protruded
Bugs item #115, was opened at 2004-09-11 03:27 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=493&aid=115&group_id=106 Category: hz Group: v1.20a Status: Open Resolution: None Priority: 5 Submitted By: Nobody (None) Assigned to: The Thanh Han (hanthethanh) Summary: character protrusion: some characters will not be protruded Initial Comment: Some characters will not be protruded into the right margin, namely: `-', `--', and `---', if entered like that. When they occur as \hyphenchar, or as a single character (e.g. \char123), everything's fine. With the EC fonts, the same happens for some quote characters. 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 \testprotrusion{``}% \testprotrusion{''}% \testprotrusion{\char13}% \quotedblbase \testprotrusion{\char18}% \quotesinglbase \testprotrusion{Z}% OK \bye ---------------------------------------------------- I don't know whether that might be related, but in all 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). (This is the same bug as reported in the dctt thread `Randausgleich von Binde- und Trennstrich', 29.8.04) Regards, Robert. ---------------------------------------------------------------------- Comment By: Nobody (None) Date: 2004-09-29 03:39 Message: Logged In: NO In the README to the patch, you say:
To scroll back over unwanted things I now have extended the discardable() macro. There was an error in the original macro anyway, as
((type(#) = kern_node) and (subtype(#) <> explicit))
is to be discarded, but
((type(#) = kern_node) and (subtype(#) = explicit))
is not.
Does that mean that `\kern1pt A\kern1pt' will not get protruded? And, what about `\kern1pt\unkern A\kern1pt\unkern'? Unfortunately, I'm not able to to test your patch. Could you (or somebody) run this file, and comment on the output, please, or upload the PDF? % ----------------------------------------------------- \pdfprotrudechars=2 \hsize5em \def\testprotrusion#1{#1 \hfill #1\penalty-10000} \font\testfont=cmr10\testfont \lpcode\font`\A=1000 \rpcode\font`\A=1000 \noindent \testprotrusion{A} \testprotrusion{\hskip0ptA\hskip0pt} \testprotrusion{\kern1exA\kern1ex} \testprotrusion{\kern1ex\unkern A\kern1ex\unkern} \testprotrusion{\kern1ex\unkern\kern1ex\unkern A\kern1ex\unkern\kern1ex\unkern} \testprotrusion{\kern1ex\kern1ex\unkern\unkern A\kern1ex\kern1ex\unkern\unkern} \testprotrusion{Z} \bye % ----------------------------------------------------- My concern is about LaTeX packages which might insert kerns as markers. For example, the csquotes package, or the footmisc package. I suppose that protrusion should take place at every point where TeX allows a line break -- is that correct? Regards, Robert ---------------------------------------------------------------------- Comment By: Hartmut Henkel (hhenkel) Date: 2004-09-20 05:09 Message: Logged In: YES user_id=929 This patch should solve now the problems with character protrusion, particularily also in combination with font expansion, see the attached PDF files and the README file. Have fun! :-) Hartmut ---------------------------------------------------------------------- Comment By: Hartmut Henkel (hhenkel) Date: 2004-09-19 22:39 Message: Logged In: YES user_id=929 still problems with expanded fonts, see PDF ---------------------------------------------------------------------- Comment By: Hartmut Henkel (hhenkel) Date: 2004-09-19 19:19 Message: Logged In: YES user_id=929 This patch should work now, see PDF files in the tarball. ---------------------------------------------------------------------- Comment By: Hartmut Henkel (hhenkel) Date: 2004-09-19 18:12 Message: Logged In: YES user_id=929 Patch tries to solve the bug. Seems to run with Robert's example. ---------------------------------------------------------------------- You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=493&aid=115&group_id=106
participants (1)
-
noreply@sarovar.org