[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Proper Small Caps.
From: |
Denis M. Wilson |
Subject: |
Re: [Groff] Proper Small Caps. |
Date: |
Sun, 18 Jan 2015 13:10:38 +0000 |
Rather than shrinking, squash the fake small caps, eg:
S\H'\n[.s]*5/7'MALL\H'0' C\H'\n[.s]*5/7'APS\H'0'
(the 5/7 should approximate to the x-height of the font).
This works better because more of the heavy strokes in a western font
are upright, and this keeps the weight of those.
As Matthew Butterick says
"If you want real small caps, you'll have to buy them"
I have such a set, but the newer version contains OpenType faces and I
haven't had time to work out how to use these with groff. The small cap
glyphs are named something like A_sc -- tricky.
I have a macro analogous to the .B, .BI macros of man pages: .SC ...,
but it works differently to Ted's ingenious solution, involving .substr.
Denis
On Sun, 18 Jan 2015 12:22:10 -0000 (GMT)
(Ted Harding) <address@hidden> wrote:
> On 18-Jan-2015 11:15:05 Ralph Corderoy wrote:
> > Hi,
> >
> > http://2d.laboratorium.net/post/108351875900/small-caps-big-problem
> > complains about small caps from Word, etc., compared with small caps
> > designed by the designer. Thought it might be of interest given
> > troff's long-time S\s-2MALL\s0 C\s-2APS\s0, especially used in the
> > formatting of Unix. IIRC, Dennis Ritchie said they did it because
> > the CAT gave them the possibility, but it was regretted for the
> > UNIX/Unix confusion it caused.
> >
> > Heirloom troff, http://heirloom.sourceforge.net/doctools.html, says
> >
> > Mechanisms for typesetting small capitals, old-style numerals,
> > and arbitrary ligatures e.g. using Type 1 _______expert______ or OpenType
> > fonts are provided.
> >
> > Don't know what the other various troff's support for proper small
> > caps is, e.g. plucking them from the OpenType font?
> >
> > Cheers, Ralph.
>
> For what it's worth, here's what I do (with example usage at end):
>
> .\"######################
> .de smallcaps
> .nr .sc.ps (\\n[.s]*80/100)
> .nr .cap.PS \\n[.s]
> .nr .scsh (\\n[.ps]/100)
> .char a \s[\\n[.sc.ps]]\Z'A'\h'\\n[.scsh]s'A\s[\\n[.cap.PS]]
> .char b \s[\\n[.sc.ps]]\Z'B'\h'\\n[.scsh]s'B\s[\\n[.cap.PS]]
> .char c \s[\\n[.sc.ps]]\Z'C'\h'\\n[.scsh]s'C\s[\\n[.cap.PS]]
> .char d \s[\\n[.sc.ps]]\Z'D'\h'\\n[.scsh]s'D\s[\\n[.cap.PS]]
> .char e \s[\\n[.sc.ps]]\Z'E'\h'\\n[.scsh]s'E\s[\\n[.cap.PS]]
> .char f \s[\\n[.sc.ps]]\Z'F'\h'\\n[.scsh]s'F\s[\\n[.cap.PS]]
> .char g \s[\\n[.sc.ps]]\Z'G'\h'\\n[.scsh]s'G\s[\\n[.cap.PS]]
> .char h \s[\\n[.sc.ps]]\Z'H'\h'\\n[.scsh]s'H\s[\\n[.cap.PS]]
> .char i \s[\\n[.sc.ps]]\Z'I'\h'\\n[.scsh]s'I\s[\\n[.cap.PS]]
> .char j \s[\\n[.sc.ps]]\Z'J'\h'\\n[.scsh]s'J\s[\\n[.cap.PS]]
> .char k \s[\\n[.sc.ps]]\Z'K'\h'\\n[.scsh]s'K\s[\\n[.cap.PS]]
> .char l \s[\\n[.sc.ps]]\Z'L'\h'\\n[.scsh]s'L\s[\\n[.cap.PS]]
> .char m \s[\\n[.sc.ps]]\Z'M'\h'\\n[.scsh]s'M\s[\\n[.cap.PS]]
> .char n \s[\\n[.sc.ps]]\Z'N'\h'\\n[.scsh]s'N\s[\\n[.cap.PS]]
> .char o \s[\\n[.sc.ps]]\Z'O'\h'\\n[.scsh]s'O\s[\\n[.cap.PS]]
> .char p \s[\\n[.sc.ps]]\Z'P'\h'\\n[.scsh]s'P\s[\\n[.cap.PS]]
> .char q \s[\\n[.sc.ps]]\Z'Q'\h'\\n[.scsh]s'Q\s[\\n[.cap.PS]]
> .char r \s[\\n[.sc.ps]]\Z'R'\h'\\n[.scsh]s'R\s[\\n[.cap.PS]]
> .char s \s[\\n[.sc.ps]]\Z'S'\h'\\n[.scsh]s'S\s[\\n[.cap.PS]]
> .char t \s[\\n[.sc.ps]]\Z'T'\h'\\n[.scsh]s'T\s[\\n[.cap.PS]]
> .char u \s[\\n[.sc.ps]]\Z'U'\h'\\n[.scsh]s'U\s[\\n[.cap.PS]]
> .char v \s[\\n[.sc.ps]]\Z'V'\h'\\n[.scsh]s'V\s[\\n[.cap.PS]]
> .char w \s[\\n[.sc.ps]]\Z'W'\h'\\n[.scsh]s'W\s[\\n[.cap.PS]]
> .char x \s[\\n[.sc.ps]]\Z'X'\h'\\n[.scsh]s'X\s[\\n[.cap.PS]]
> .char y \s[\\n[.sc.ps]]\Z'Y'\h'\\n[.scsh]s'Y\s[\\n[.cap.PS]]
> .char z \s[\\n[.sc.ps]]\Z'Z'\h'\\n[.scsh]s'Z\s[\\n[.cap.PS]]
> .char \(i. \s[\\n[.sc.ps]]\Z'I'\h'\\n[.scsh]s'I\s[\\n[.cap.PS]]
> ..
> .de /smallcaps
> .\"\c
> .rchar a b c d e f g h i j k l m n o p q r s t u v w x y z \(i.
> .rr .sc.ps
> .rr .cap.PS
> .rr .scsh
> ..
>
> .smallcaps
> Here Is An Example Of Smallcaps
> ./smallcaps
>
> .\"######################
>
> Note the over-printing to slightly "fatten" the reduced-size capitals.
>
> NB That this is oriented towards PS output!
>
> Best wishes to all,
> Ted.
>
> -------------------------------------------------
> E-Mail: (Ted Harding) <address@hidden>
> Date: 18-Jan-2015 Time: 12:22:07
> This message was sent by XFMail
> -------------------------------------------------
>
--