[pdftex] auto letter spacing

Reinhard Kotucha reinhard.kotucha at web.de
Tue Dec 12 22:31:09 CET 2006


>>>>> "Taco" == Taco Hoekwater <taco at elvenkind.com> writes:

  > Hi Thanh,

  >>> However I am not sure the "more right" way to do this is that
  >>> each character c should have a kern of 5*width_of_c/1000 at each
  >>> side, ie the kern inserted around each character is proportional
  >>> to its width, instead of having a fixed global value for all
  >>> characters. This is more closed to the way font expansion is
  >>> done, but is different from what fontinst does for
  >>> letter-spacing.

  > I am much in favour of the equal width solution.

Agreed.  Consider "ll" and "mm".

Thanh, I suggest to implement fixed spaces first because implementing
variable spaces seems to be additional work.  Then prepare a little
.tex file with some text in \rm, \uppercase, and \sc with different
amounts of spacing.  If the result looks good, you are done, otherwise
the typeset output will hopefully help you to find out how to improve
it.  I expect that the result with fixed spaces will be good but
that's just a guess.  All what counts is how it looks, but whom do I
tell this?  You are the microtypography guru.

Presumably the number 5 in the formula above (5*width_of_c/1000) is
not a constant but a variable which can be set by the user.

I suppose that the code should go into this year's TeXLive.  It's a
pity that there is not much time.  Otherwise I could simulate this in
PostScript but I can't do it this week. 

There is also the problem what to do with inserted spaces at the
beginning/end of letterspaced text:

Hans Hagen wrote:

  > Is there a way to prevent the kern before or after a char? Say
  > that we have a section title, in that case one does not want the
  > margin to be spoiled (the first char needs to align then)

In my opinion it doesn't make much sense to have an additional
primitive.  What is needed is to make the extra space a "discardable
item", which means that it has to be removed at the beginning/end of
a line.  Otherwise it will interfer with character protrusion.

If it is necessary to remove an extra space within a paragraph, for
instance in the table of contents,

	 1. V...
	 2. I...

you probably want to have character protrusion too.  However, I think
this can be done on macro level by starting new paragraphs after the
numbers.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------




More information about the pdftex mailing list