# [pdftex] Character protruding

Thierry Bouche Thierry.Bouche at ujf-grenoble.fr
Tue Dec 18 10:04:53 CET 2001

```Concernant « Re: [pdftex] Character protruding », Gerolf écrit : «
»
» > Can I deduce \rpcode for protruding from the character width or from
» > \fontdimen parameters?
»
» Thierry Bouche wrote:
»
» >Of course not, rpcode is something like kern pairs, it has to be
» >visually twickled font per font.

hmmm, maybe `tweaked' ? my english got frozen, somehow...

» I have feared something like this because TeX doesn't know what the
» glyphs look like...

exactly. This is metric info related to one font (but also to the
language used, maybe is this a case where opentype format could beat
TFM...). However, I believe InDesign does it following only purely
graphicals rationales...

» I see, you want to do it perfectly. My first impression was that it
» already helps a lot to simply shift hyphen, point, comma completely into
» the margin.

this is a common idea (hanging punctuation, not optical
justification). But not that convincing. For instance, what if an
emdash ends a line right under a hanging hyphen? In fact, using it may
prove pleasing to the eye -- at a certain distance of the page -- and
disturbing for actual reading. Use with care! I met a case (very old
looking font with very sloped hyphen) where putting the hyphen only in
the margin was the right way to diminish its visual impact. With more
modern fonts like Times, I think it looks bad, although optical
justification may give pleasant results.

» Would you say that it isn't possible to give rules of thumb
» for some worst cases, so that I can use different fonts?

If what you want is to put entirely some chars in the margin, then you
simply have to compute their width in em units. If what you want is
even margins, you have to go for trial and errors...

» >Here I mention french because the thin space before double punctuation
» >makes that you can't treat it the same way (putting ot almost entirely
» >into the margin) as a point or a coma.
» >
» Je ne comprends pas la deuxième partie de cette phrase. Pouvez-vous me
» donner un exemple?

Hmm. In French, we put a thin space before " : ; ? ! ". If you put
them in the margin, the result is quite uneven because the visual
margin should then be achieved by this white space! The interrogation
also needs special treatment because it should be just slightly hung
out, say as a B.

» Thank you for these hints. I'm going to study "protcode.tex" and

protcode is good for english & an average upright font.

--
Thierry Bouche

```