[XeTeX] Font protrusion --- new or old ?
Stephen Moye
sgmoye at me.com
Mon Feb 9 17:23:59 CET 2009
The only place this seems not to work is at the very beginning and the
very end of paragraphs -- odd:
%%!TEX TS-program = xetex
\font\tenrm="Times New Roman" at 10pt
\tenrm
\XeTeXinterchartokenstate=1
\XeTeXcharclass "201C = 10
\XeTeXcharclass "201D = 11
\newdimen\quotehang
\XeTeXinterchartoks 255 10 = {{\XeTeXinterchartokenstate=0
\setbox0=\hbox{\char"201C}\quotehang=\wd0
\ifhmode\kern\quotehang\vadjust{}\else\leavevmode\fi
\kern-\quotehang}}
\XeTeXinterchartoks 11 255 = {{\XeTeXinterchartokenstate=0
\setbox0=\hbox{\char"201D}\quotehang=\wd0
\kern-\quotehang\kern\quotehang}}
\hsize=3.25in
\parfillskip0pt
\noindent
“The one thing which I would note is that one can do this sort of thing
(to a certain degree) at the macro level — see Donald Knuth’s
description of “hanging punctuation” as “an easier problem” in The
\TeX{}book and Peter Wilson’s “hanging” package which enables this for
La\TeX\ and blah.”
\end
Stephen
More information about the XeTeX
mailing list