bug-groff
[Top][All Lists]
Advanced

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

[bug #64155] [troff] specifying -fZD on command line generates warnings


From: G. Branden Robinson
Subject: [bug #64155] [troff] specifying -fZD on command line generates warnings
Date: Sat, 18 May 2024 17:11:43 -0400 (EDT)

Follow-up Comment #44, bug #64155 (group groff):

[comment #43 comment #43:]
> A vast improvement!
> 
> But maybe a little _too_ quiet: groff disregards the -fZD flag without
telling the user it's doing so.
> 
> echo "\N'110'" | groff -ww -fZD
> 
> This fails to load the ZD family (because there is no such thing) or the ZD
font (because that's not what -f does), so outputs an "n" rather than a solid
square.  The invalid -f ought to at least provoke a warning, at least when all
warnings are activate.

I can't reproduce this.  I suspect you're not using _echo_(1) the way you
think you are.  Backslash escape sequences are not a portable application of
it.  POSIX specifies them, but (a) you need to double the backslash in this
case and (b) some environments _still_ won't support them, claiming that the
only feature echo should support is an `-n` flag.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html

I changed glyphs to a snowflake to make things work more obviously.


$ groff --version | tail -n 1
GNU troff (groff) version 1.23.0.1258-f66cd
$ printf "\\N'100'\n" | groff -ww -fZD >| dave.ps
$ tail dave.ps 
def/PL 792 def/LS false def
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/ZapfDingbats-Reverse SF(d)72 12 Q 0 Cg EP
%%Trailer
end
%%EOF


Because the default style is 'R', and the font 'ZDR' exists (on the  "ps"
default output device), this actually works.

If I change to a device that doesn't have 'ZDR', I get an error.


$ printf "\\N'100'\n" | groff -Tdvi -ww -fZD >| dave.ps
troff: fatal error: invalid default font family 'ZD'




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64155>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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