groff
[Top][All Lists]
Advanced

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

Re: [Groff] groffview shell script


From: Ralph Corderoy
Subject: Re: [Groff] groffview shell script
Date: Sat, 01 Dec 2001 10:40:43 +0000

Hi Bernd,

> > > The idea behind this is that the X server usually checks the font
> > > path at startup, all non-suitable directories are removed from
> > > the font path variable.
> > 
> > What X server is that?
>
> All XFree86 servers, see X(1).  I use the vanilla nvidia mode.

But you can't just write for an XFree86 world, so you can't assume all
non-suitable font directories are removed from the font path variable.
Besides, the user can set it later to what they prefer.

> > As said before, I'd put the most suitable font directories at the
> > front of the path, but put worse quality ones in later for the
> > fonts that only they contain.  So 75,100 might be possible.
> > 
> > Why not either just hard-code 100 or do the check properly by
> > looking for which directory is mentioned first?  Either is
> > acceptable.  The middle ground seems the worst.
>
> I take 100.  If, however, there isn't a 100 in the font path, but
> there is a 75, then and only then I use the 75.  Moreover, I do not
> worry about about xdpyinfo, nor about X -probeonly, or whatever.  100
> is always good, except if there aren't any 100 fonts.

Yes, I'm not suggesting xdpyinfo or X -probeonly.  Just xset to query
the font path.  But your test is inadequate and both Stewart and I have
pointed that out repeatedly, and I've provided some simple awk to do a
better test.

Your statement `100 is always good, except if there aren't any 100
fonts' is false.  100 may be a poor substitute for 75 and 75 should be
used in preference.  That's why, for example, it appears sooner in the
font path.  And that's why the awk looked along the font path to see
what was specified first.

So either hardcode 100 or put in a better test than `grep'.

> > cat `man -aw groff`?
> 
> I'm using the `man -w' mechanism in groffview 0.2 to get the
> man-pages.

My point was that it seems like feeping creaturism for groffview to do
this since it is already available with man, especially if your man has
-w available, which mine doesn't  :-)  It's not part of the Single UNIX
Specification, Version 2.

So it'll either not work because man doesn't have -w, or it probably
isn't worth having since cat will do the same job.

    cat `man -w true`

Cheers,


Ralph.


reply via email to

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