> Having installed a new font, I now want to print all characters.
> I thought of having a loop:
>
> for i=1 to 350 do X
> "i" "\N'i'"
> X
>
> But this won't work, of course.
Actually, it works -- see below. I'll update the documentation
(namely that the `c' conditional operator works with \N'...' also).
Werner
PS: Testing the CR font this way with gs 8.53 shows that a lot of
glyphs defined in groff's font description file are actually
missing... I think this is another, very convincing argument to
redo the metrics of the standard PS fonts.
======================================================================
.\"
.\" show-glyphs [font]
.\"
.de show-glyphs
. vs +6
. ps +5
. nop All glyphs in font \\$1
. br
. ps
. vs
.
. nr glyphnum 0
. nr fails 0
. ft \\$1
.
. while (\\n[fails] < 100) \{\
. ie c \N'\\n[glyphnum]' \{\
. nop \f[]\\n[glyphnum]: \f[\\$1]\N'\\n[glyphnum]'
. br
. \}
. el \
. nr fails +1
. nr glyphnum +1
. \}
.
. ft
..
.
.show-glyphs CR
.show-glyphs TR
_______________________________________________
Groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/groff