[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] [off] micro-typography

From: Larry Kollar
Subject: Re: [Groff] [off] micro-typography
Date: Sun, 3 Feb 2002 09:13:35 -0500

Ted Harding wrote:

>>> The basic mechanisms for fiddling character widths [track-kerning,
>>> use '.tkf'] and for having certain characters protrude slightly
>>> into the margin already exist in groff.
>> .tkf is a no-no for good typography.  Instead, an orthogonal function
>> of \H would be necessary, i.e a function which expands or compresses
>> the font width.  pdfTeX can do this automatically.

> This is easily done by combining \s and \H, for instance
>   \s'+500u'\H'-500u'Some text\H'0\s0
> will increase the point size by 500u (1/2 point) and squash
> the height by 500u, resulting in a font which has been
> stretched sideways by 500u.

That has other applications, going the other way. At work, where
I use FrameMaker, I defined a display format that uses Frame's
"Stretch" attribute to (in effect) create a Courier Narrow font.
It looks good in print and I can use 9pt text instead of 7pt text
to keep displays from wrapping. Nice to know I can duplicate that
effect in groff -- thanks for the tip!

Getting back to the hanging punctuation issue, which I think this
was about originally, it would probably be easier to hard-code
the behavior in gtroff than to write convoluted macros. I'd imagine
the logic would look something like this:

        /* line is filled, spread it out */
        old_ll = ll;

        if( hanging_punctuation && last_char_is_in(",.;:\)!\"'") )
                ll += char_width(last_char);

        ll = old_ll;

I'm not a programmer by trade, so I suspect it's not quite this

Larry Kollar   k o l l a r  at  a l l t e l . n e t
"Content creators are the engine that drives value in the
information life cycle."   -- Barry Schaeffer, on XML-Doc

reply via email to

[Prev in Thread] Current Thread [Next in Thread]