1Pbmtextps User Manual(0)                              Pbmtextps User Manual(0)
2
3
4

NAME

6       pbmtextps - render text into a PBM image using a postscript interpreter
7
8

SYNOPSIS

10       pbmtextps [-font fontname] [-fontsize float] [-resolution n] [-leftmar‐
11       gin=n] [-rightmargin=n]  [-topmargin=n]  [-bottommargin=n]  [-ascent=n]
12       [-descent=n] [-pad] [-crop] [-stroke n] [-verbose] [-dump-ps] text
13
14

DESCRIPTION

16       This program is part of Netpbm(1).
17
18       pbmtextps takes a single line of text from the command line and renders
19       it into a PBM image.  The image is of a single line  of  text;  newline
20       characters in the input have no effect.
21
22       See  pbmtext for a more sophisticated generator of text, but using less
23       common font formats.  pbmtext can generate multiple lines of text.
24
25       The -plain common option ⟨index.html#commonoptions⟩  has no effect  be‐
26       fore Netpbm 10.42 (March 2008).  The output is always raw PBM.
27
28
29   Margins
30       By  default,  the image is cropped at the top and the right.  It is not
31       cropped at the left or bottom so that the text begins at the same posi‐
32       tion  relative  to the origin.  The size of the default left and bottom
33       margins is explained below.
34
35       You can set whatever margin you want with options -leftmargin,  -right‐
36       margin,  -topmargin  and  -bottommargin.  The specified amount of white
37       space gets added to the far edge of type, e.g. if you specify 10 points
38       for -topmargin, you will get 10 points of white space above the highest
39       character on the line.  Specify 0 to crop a side.
40
41       -ascent adds white space to the top to reach a specified distance above
42       the  text  baseline,  and -descent adds white space to to the bottom to
43       reach a specified distance below the text baseline.
44
45       -ascent and -descent are more useful than -topmargin  and  -bottomargin
46       when  you  render  two  pieces of text (in separate invocations of pbm‐
47       textps) that you will concatenate horizontally.  With -ascent and  -de‐
48       scent,  as long as you specify a value greater than the height or detph
49       of every character in the font, the two images will be the same  height
50       with the text baseline in the same place.  With -topmargin and -bottom‐
51       margin, that may not be the case.
52
53       Example:
54
55            $ pbmtextps -font=Times-Roman -descent=20 \
56                 'The soup is called' > a1.pbm
57            $ pbmtextps -font=Itallic -descent=20 'Goulash.' > a2.pbm
58            $ pnmcat -leftright -jbottom a1.pbm a2.pbm > out.pbm
59
60
61       If you're using -descent to line up the segments of text you are
62         concatenating horizontally with pnmcat, use the -jbottom
63         (justify to bottom) option on pnmcat as in the example above.  If you
64         use -ascent, use -jtop instead.
65
66       Similarly, if you render two lines of text (in separate invocations of
67         pbmtextps) that you will concatenate vertically, -ascent and
68         -descent with sufficiently large values will ensure your baselines
69         are uniformly spaced.
70
71       If you have -ascent, there is probably no point in specifying  -topmar‐
72       gin  too, but if you do, the effect is cumulative.  The same is true of
73       -descent and -bottommargin.
74
75       -pad pads the image on the top and bottom to the where the highest  and
76       lowest characters in the font would reach, even if you don't have those
77       characters in your text.  This is useful if you will generate  multiple
78       images of text (with multiple invocations of pbmtextps) and concatenate
79       them vertically to create a multiline text image.  -pad makes sure  the
80       lines in this image are equally spaced.
81
82       Example:
83
84           $ pbmtextps 'cat'   | pamfile
85           $ pbmtextps 'Catty' | pamfile
86
87
88       The commands above, with no -pad, show that the 'Catty' image is higher
89       because capital C reaches high and 'y' reaches low.
90
91           $ pbmtextps -pad 'cat'   | pamfile
92           $ pbmtextps -pad 'Catty' | pamfile
93
94
95       The commands above, with -pad, show  that  both  images  are  the  same
96       height.
97
98       If  you  specify -pad with -ascent or -descent, the larger value is ef‐
99       fective.
100
101       -crop makes the program crop all sides to the far edge of the type.  It
102       is  the  same  as -leftmargin=0 -rightmargin=0 -topmargin=0 -bottommar‐
103       gin=0.
104
105       You cannot specify any other margin-affecting options with -crop.
106
107       The default top margin, when you specify neither  -ascent,  -topmargin,
108       nor -pad, is as if you specified topmargin=0.
109
110       The  default bottom margin, when you specify neither -descent, -bottom‐
111       margin, nor -pad, is as if you specified -descent=1.5*fontsize.
112
113       The default left margin, when you do not specify -leftmargin, is as  if
114       you specified -leftmargin=0.5*fontsize.
115
116       The  default  right margin, when you do not specify -rightmargin, is as
117       if you specified -rightmargin=0.
118
119
120

OPTIONS

122       In addition to the options common to all programs  based  on  libnetpbm
123       (most notably -quiet, see
124        Common  Options ⟨index.html#commonoptions⟩ ), pbmtextps recognizes the
125       following command line options:
126
127
128
129       -font=fontname
130
131              This specifies the font to use.  fontname is  the  name  of  any
132              valid Postscript font which is installed on the system.
133
134              The default is TimesRoman.
135
136              Here  is  a  way to get a list of the names of all the available
137              fonts:
138
139                      $ gs -c '(*) {==} 256 string /Font resourceforall'
140
141
142              Warning: if fontname does not name a valid font, pbmtextps  just
143              uses the default font.  It does not tell you it is doing this.
144
145
146       -fontsize=float
147              This is the size of the font in points.  See the -resolution op‐
148              tion for information on how to interpret this size.
149
150              The default is 24 points.
151
152              Before Netpbm 10.75 (June 2016), this has to be a whole number.
153
154
155       -resolution=n
156              This is the resolution in dots per inch of distance measurements
157              pertaining  to  generation  of the image.  PBM images don't have
158              any inherent resolution, so a distance such as "1 inch"  doesn't
159              mean  anything  unless  you  separately  specify what resolution
160              you're talking about.  That's what this option does.
161
162              In particular, the meaning of the font  size  is  determined  by
163              this  resolution.  If the font size is 24 points and the resolu‐
164              tion is 150 dpi, then the font size is 50 pixels.
165
166              The default is 150 dpi.
167
168
169       -leftmargin=n
170
171       -rightmargin=n
172
173       -topmargin=n
174
175       -bottommargin=n
176              These options control the margins added to the  image,  measured
177              from  the far edge of the type.  See Margins ⟨#margins⟩  for de‐
178              tails.
179
180              All sizes are in points, as a floating point number.
181
182              These options were new in Netpbm 10.75 (June 2016).
183
184
185       -ascent=n
186
187       -descent=n
188              These options control the margins added to the  image,  measured
189              from the text baseline.  See Margins ⟨#margins⟩  for details.
190
191              Sizes are in points, as a floating point number.
192
193              These options were new in Netpbm 10.75 (June 2016).
194
195
196       -pad   This pads the image on the top and bottom to the where the high‐
197              est and lowest characters in the font would reach, even  if  you
198              don't   have   those  characters  in  your  text.   See  Margins
199              ⟨#margins⟩  for details.
200
201              This option was new in Netpbm 10.75 (June 2016).
202
203
204       -crop  This makes the program crop all sides to the  far  edge  of  the
205              type.   It  is the same as -leftmargin=0 -rightmargin=0 -topmar‐
206              gin=0 -bottommargin=0.  See Margins ⟨#margins⟩  for details.
207
208              This option was new in Netpbm 10.75 (June 2016).
209
210
211       -stroke=n
212              This is the width of line, in points, to use  for  stroke  font.
213              There  is  no  default  stroke  width because the characters are
214              solid by default.
215
216
217       -verbose
218              This option makes pbmtextps display extra information  on  Stan‐
219              dard Error about its processing.
220
221
222       -dump-ps
223              This  option  makes pbmtextps write to Standard Output the Post‐
224              script program it would use to create the image, rather than the
225              image  itself.  You can use this as input to a Postscript inter‐
226              preter (such as Ghostscript or a a printer) or to understand the
227              program better.
228
229              This option was new in Netpbm 10.75 (June 2016).
230
231
232
233

USAGE

235       You can generate antialiased text by using a larger resolution than the
236       default and scaling the image down using pamscale.
237
238       See the manual for the similar pbmtext for more advice on usage.
239
240

HISTORY

242       pbmtextps was added to Netpbm in Release 10.0 (June 2002).
243
244
245

SEE ALSO

247       pbmtext(1), pamcut(1),  pnmcrop(1),  pamcomp(1),  ppmchange(1),  pnmro‐
248       tate(1), pamscale(1), ppmlabel(1), pbm(1)
249
250

AUTHOR

252       Copyright (C) 2002 by James McCann
253

DOCUMENT SOURCE

255       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
256       source.  The master documentation is at
257
258              http://netpbm.sourceforge.net/doc/pbmtextps.html
259
260netpbm documentation             21 July 2022         Pbmtextps User Manual(0)
Impressum