Remove no longer needed catman periodic via 'make upgrade'.
[dragonfly.git] / contrib / groff / contrib / hdtbl / examples / fonts_x.in
1 .\"     -*-     mode: roff      -*-
2 .ig
3
4 font_x.roff
5
6 This file is part of groff, the GNU roff type-setting system.
7
8 Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
9 written by Joachim Walsdorff <Joachim.Walsdorff@urz.uni-heidelberg.de>.
10
11 groff is free software; you can redistribute it and/or modify it under
12 the terms of the GNU General Public License as published by the Free
13 Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
15
16 groff is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19 for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
23
24 ..
25 .
26 .
27 .\"     ******************************************************************
28 .\"     **              groff glyphs vs. character codes:               **
29 .\"     **      .fontdump [font1 font2 ...]                             **
30 .\"     **              Print glyphs of font1, font2, ..., versus       **
31 .\"     **              character code.                                 **
32 .\"     **              `all' as fontname prints all fonts in the       **
33 .\"     **              specified string `fontpath'.                    **
34 .\"     **              without arg: glyphs and codes of active font.   **
35 .\"     ******************************************************************
36 .
37 .time start
38 .
39 .if !d fontpath \
40 .  ds fontpath @fontdir@
41 .
42 .de fontdump
43 .  ie \\n[.$] \
44 .    ds *args \\$*
45 .  el \
46 .    ds *args \\n[.fn]
47 .
48 .  pso bash -c \
49        "echo -n .ds *f\ ; \
50         ls \\*[fontpath]/dev\*[.T] \
51         | tr '[:cntrl:]' ' '"
52 .  \"   This dummy line is necessary; the preceding line eats it.
53 .
54 .  while !"\\*[*args]"" \{\
55 .    pops *$1 *args
56 .
57 .    if "\\*[*$1]"all" \{\
58 .      ds *args \\*[*f] \\*[*args]
59 .      pops *$1 *args
60 .      nr *all 1
61 .    \}
62 .
63 .    if \\n[*all] \{\
64 .      if "\\*[*$1]"." \
65 .        nr *all 0
66 .      if !F \\*[*$1] \
67 .        continue
68 .    \}
69 .
70 .    index "\\*[*f]" \\*[*$1]
71 .
72 .    ie (\\n[.y] > 18) \
73 .      if !F \\*[*$1] \{\
74 .        tm \\n[.F]:\\n[.c]: Font \\*[*$1] not found.
75 .        continue
76 .      \}
77 .    el \{\
78 .      if !\\n[index] \{\
79 .        tm \\n[.F]:\\n[.c]: Font \\*[*$1] not found.
80 .        continue
81 .      \}
82 .
83 .      nr * \\n[.f]
84 .      ft \\*[*$1]
85 .      nr ** \\n[.f]
86 .      ft
87 .
88 .      if (\\n[**] == \\n[*]) \
89 .        continue
90 .    \}
91 .
92 .    if \\n[t*cptn] \
93 .      bp
94 .
95 .    tm listing font `\\*[*$1]'...
96 .
97 .    TBL border=.1n bc=red cpd=0 csp=.1n bgc=
98 .      CPTN groff font \\*[*$1] \
99             .br \
100             val=b ".pso grep -e internalname \\*[fontpath]/dev\*[.T]/\\*[*$1]"
101 .      TR
102 .        TD
103 .          TBL cols=18 border=.1n bc=red csp=.1n cpd=.2n fgc=red4 bgc=beige \
104                hal=c fsz='1.2 1.7' fst=\\*[*$1]
105 .            nr c# 0-1 1
106 .            nr y# 0 1
107 .            TR fst=HB fgc=blue
108 .              TD
109 .              nr x# 0-1 1
110 .              while (\\n+[x#] < 16) \{\
111 .                d2x \\n[x#]
112 .                  TD
113 .                    nop \&.\\*[hex#]
114 .              \}
115 .              TD
116 .
117 .            nr y# -1
118 .            while (\\n+[y#] < 17) \{\
119 .              TR
120 .                TD fgc=blue fst=HB
121 .                d2x \\n[y#]
122 .                  nop \\*[hex#].
123 .                nr x# 0-1 1
124 .                while (\\n+[x#] < 16) \{\
125 .                  TD
126 .                    if c \N'\\n+[c#]' \
127 .                      nop \N'\\n[c#]'
128 .                \}
129 .                TD fgc=blue fst=HB
130 .                d2x \\n[y#]
131 .                  nop \\*[hex#].
132 .            \}
133 .
134 .            TR fst=HB fgc=blue
135 .              TD
136 .              nr x# 0-1 1
137 .              while (\\n+[x#] < 16) \{\
138 .                d2x \\n[x#]
139 .                TD
140 .                  nop \&..\\*[hex#]
141 .              \}
142 .              TD
143 .          ETB
144 .    ETB
145 .  \}
146 ..
147 .
148 .fontdump all
149 .
150 .time
151 .date
152 .
153 .\"     466MHz Celeron CPU, 384MB RAM
154 .\"     WindowsXP/cygwin groff18.1:     107s
155 .\"     WindowsXP/cygwin groff19.2:     390s
156 .\"     Suse Linux 9.3 groff19.2:        66s