groff
[Top][All Lists]
Advanced

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

Re: [groff] [UTROFF] About fonts


From: Larry Kollar
Subject: Re: [groff] [UTROFF] About fonts
Date: Fri, 1 Dec 2017 23:20:18 -0500

> Pierre-Jean <address@hidden> wrote:
> 
> Hello alls,
> 
> 
> Heirloom Troff can mount OpenType fonts like any other font. It
> can also define all kind of ligatures, adapt the kerning, and
> enables the OpenType features, as follow.
> 
>    .fp 1 R LinLibertine_R otf
>    .flig R ct \[c_t] st \[s_t]
>    .feature R +lnum
>    .kernafter R ’ 100
> 
> 
> That’s very handy. But the problem with such an easiness and the
> variety of available features, is that I quickly had too many
> mounted fonts, and it was becoming difficult to name each of
> them.

This is one of the things I like about Groff: the “.fam” request sets the font 
family,
and then the usual B / I / BI / R settings apply from there. For small caps, I 
think
a SC setting would be a sensible extension.

In my printed fiction, I use small caps for the headers (and in the front 
matter).
I’ve been using Neatroff for that, since I can turn on small caps with the .ff 
request.
It’s straightforward.


> I think there is yet a post on this list about those font
> toggles.  Here is how it is implemented in Utmac (in the file
> u-fonts.tmac).  First, fonts are internally mounted and named in
> the form f-[Bold][Italic][Feature], where Bold, Italic, and
> Feature are numbers:
> 
>    f-000 roman
>    f-100 bold
>    f-010 italic
>    f-001 small capitals
>    f-002 acronyms, all capitals
>    f-003 superscripts
>    f-004 subscript
>    f-005 final glyphs
>    f-113 bold italic superscirpt
>    f-302 Extra bold acronyms

TBH, I think this is overly complex… unless many TT/OT fonts provide special
glyphs for super/subscript and acronyms. (I’m not sure what “final glyphs” means
in the above.) AT&T Troff attempted to render acronyms using what amounts to
small-caps; I’m not sure what typographical difference there is between acronyms
and small-cap strings.

Personally, I think Roman (R), Bold (B), Italic (I), and Small Caps (SC)—and
combinations thereof—can define all but the most esoteric cases.

Small caps can be a gnarly issue, though—there are three situations to consider:

1. Small caps are embedded in the typeface file, and can be called up with 
+smcp (ex: TeX Gyre fonts)
2. Small caps are in a separate file from the primary typeface (ex: Linux 
Libertine)
3. The typeface has no native small caps support (so you fake it with .ps -2)


> While the system may seem complex, it works perfectly, and has a
> very simple user interface. It also comes with another advantage:
> it is now easy to create xml documents from troff sources. But
> that will be for my next topic!

OK, I’m intrigued. If you can get clean XML out of a *roff file, you have 
something
worth looking at!

        Larry




reply via email to

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