[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: Adding styles to DESC
From: |
Peter Schaffter |
Subject: |
Re: [Groff] Re: Adding styles to DESC |
Date: |
Sat, 12 Jun 2004 20:43:19 -0400 |
User-agent: |
Mutt/1.5.4i |
On Sat, Jun 12, 2004, Werner LEMBERG wrote:
> There are nice tricks available. Consider this:
>
> .fp \n[.fp] TimesRoman TR
> .fp \n[.fp] TimesBold TB
> .
> .fp 0 dummy TR
> .ft 0
> .
> .sty \n[.fp] Roman
> .
> .fam Times
> .ft Roman \" -> TimesRoman = TR
>
> LaTeX is doing something similar in its font definition files: The
> external names are completely separated from the internal ones.
Goodness. That's the third or fourth time you've mentioned LaTeX.
I hope you haven't been seduced by the dark side of the Force. :-)
> > Indeed. The major issue, as I see it is: what constitutes a
> > "meaningful default"? If a user calls .fam <m> when style <n> is
> > active, but fam <m> has no style <n>, how should groff behave? By
> > selecting a (hypothetical) first "style" that does exist for family
> > <m>, or by reverting to a something like the dummy font?
>
> You have to decide on the priority of the font selection parameters.
> If `family' is stronger than `style', then any style of family <m>
> will be a proper replacement if style <n> isn't available. You might
> register a `fallback font' for a given family which is always used if
> the user selects a nonexisting font shape.
The latter suggestion is definitely the one I'd go for, but even
then, I doubt I'd try to implement it in the mom macros (which is
what I'm most concerned about). What I'd like to be able to do is
allow users to switch to family <m> but keep font style <n> if the
font style exists. If style <n> doesn't exist for family <m>, then
mom would .ab with a warning. The problem I have with a fallback
is that it could result in tons of wasted paper and ink in the
event that a user prints a doc without previewing it first.
> > But I'm thinking that what's also needed is a
> > string-valued register containing the name of the current style,
> > [...]
>
> Good idea. This should be rather easy to implement, I think. Stay
> tuned.
With baited breath. :-)
> > > .if S <style> \" true if <style> has been registered, either via
> > > \" the DESC file or with .sty
> >
> > Not sure I understand the need for this, but then I'm a bit
> > brain-fried today. :)
>
> You need this to check whether e.g.
>
> .ft foo
>
> selects a real font `foo' or a style `foo'.
Right. Duh!
--
Peter Schaffter
Author of _The Schumann Proof_, appearing fall, 2004
(pub. RendezVous Press, Canada)