1Pbmtextps User Manual(0) Pbmtextps User Manual(0)
2
3
4
6 pbmtextps - render text into a PBM image using a postscript interpreter
7
8
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
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
26 before 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
48 -descent, the two images will be the same height with the text baseline
49 in the same place. With -topmargin and -bottommargin, that may not be
50 the case.
51
52 Example:
53
54 $ pbmtextps -font=Times-Roman -descent=20 \
55 'The soup is called' > a1.pbm
56 $ pbmtextps -font=Itallic -descent=20 'Goulash.' > a2.pbm
57 $ pnmcat -lr -jb a1.pbm a2.pbm > out.pbm
58
59 If you have -ascent, there is probably no point in specifying -topmar‐
60 gin too, but if you do, the effect is cumulative. The same is true of
61 -descent and -bottommargin.
62
63 -pad pads the image on the top and bottom to the where the highest and
64 lowest characters in the font would reach, even if you don't have those
65 characters in your text. This is useful if you will generate multiple
66 images of text (with multiple invocations of pbmtextps) and concatenate
67 them vertically to create a multiline text image. -pad makes sure the
68 lines in this image are equally spaced.
69
70 Example:
71
72 $ pbmtextps 'cat' | pamfile
73 $ pbmtextps 'Catty' | pamfile
74
75 The commands above, with no -pad, show that the 'Catty' image is higher
76 because capital C reaches high and 'y' reaches low.
77
78 $ pbmtextps -pad 'cat' | pamfile
79 $ pbmtextps -pad 'Catty' | pamfile
80
81 The commands above, with -pad, show that both images are the same
82 height.
83
84 If you specify -pad with -ascent or -descent, the larger value is
85 effective.
86
87 -crop makes the program crop all sides to the far edge of the type. It
88 is the same as -leftmargin=0 -rightmargin=0 -topmargin=0 -bottommar‐
89 gin=0.
90
91 You cannot specify any other margin-affecting options with -crop.
92
93 The default top margin, when you specify neither -ascent, -topmargin,
94 nor -pad, is as if you specified topmargin=0.
95
96 The default bottom margin, when you specify neither -descent, -bottom‐
97 margin, nor -pad, is as if you specified -descent=1.5*fontsize.
98
99 The default left margin, when you do not specify -leftmargin, is as if
100 you specified -leftmargin=0.5*fontsize.
101
102 The default right margin, when you do not specify -rightmargin, is as
103 if you specified -rightmargin=0.
104
105
106
108 -font=fontname
109
110 This specifies the font to use. fontname is the name of any
111 valid postscript font which is installed on the system.
112
113 The default is TimesRoman.
114
115 Warning: if fontname does not name a valid font, pbmtextps just
116 uses the default font. It does not tell you it is doing this.
117
118
119 -fontsize=float
120 This is the size of the font in points. See the -resolution
121 option for information on how to interpret this size.
122
123 The default is 24 points.
124
125 Before Netpbm 10.75 (June 2016), this has to be a whole number.
126
127
128 -resolution=n
129 This is the resolution in dots per inch of distance measurements
130 pertaining to generation of the image. PBM images don't have
131 any inherent resolution, so a distance such as "1 inch" doesn't
132 mean anything unless you separately specify what resolution
133 you're talking about. That's what this option does.
134
135 In particular, the meaning of the font size is determined by
136 this resolution. If the font size is 24 points and the resolu‐
137 tion is 150 dpi, then the font size is 50 pixels.
138
139 The default is 150 dpi.
140
141
142 -leftmargin=n
143
144 -rightmargin=n
145
146 -topmargin=n
147
148 -bottommargin=n
149 These options control the margins added to the image, measured
150 from the far edge of the type. See Margins ⟨#margins⟩ for
151 details.
152
153 All sizes are in points, as a floating point number.
154
155 These options were new in Netpbm 10.75 (June 2016).
156
157
158 -ascent=n
159
160 -descent=n
161 These options control the margins added to the image, measured
162 from the text baseline. See Margins ⟨#margins⟩ for details.
163
164 Sizes are in points, as a floating point number.
165
166 These options were new in Netpbm 10.75 (June 2016).
167
168
169 -pad This pads the image on the top and bottom to the where the high‐
170 est and lowest characters in the font would reach, even if you
171 don't have those characters in your text. See Margins
172 ⟨#margins⟩ for details.
173
174 This option was new in Netpbm 10.75 (June 2016).
175
176
177 -crop This makes the program crop all sides to the far edge of the
178 type. It is the same as -leftmargin=0 -rightmargin=0 -topmar‐
179 gin=0 -bottommargin=0. See Margins ⟨#margins⟩ for details.
180
181 This option was new in Netpbm 10.75 (June 2016).
182
183
184 -stroke=n
185 This is the width of line, in points, to use for stroke font.
186 There is no default stroke width because the characters are
187 solid by default.
188
189
190 -verbose
191 This option makes pbmtextps display extra information on Stan‐
192 dard Error about its processing.
193
194
195 -dump-ps
196 This option makes pbmtextps write to Standard Output the Post‐
197 script program it would use to create the image, rather than the
198 image itself. You can use this as input to a Postscript inter‐
199 preter (such as Ghostscript or a a printer) or to understand the
200 program better.
201
202 This option was new in Netpbm 10.75 (June 2016).
203
204
205
206
208 You can generate antialiased text by using a larger resolution than the
209 default and scaling the image down using pamscale.
210
211 See the manual for the similar pbmtext for more advice on usage.
212
213
215 pbmtextps was added to Netpbm in Release 10.0 (June 2002).
216
217
218
220 pbmtext(1), pamcut(1), pnmcrop(1), pamcomp(1), ppmchange(1), pnmro‐
221 tate(1), pamscale(1), ppmlabel(1), pbm(1)
222
223
225 Copyright (C) 2002 by James McCann
226
228 This manual page was generated by the Netpbm tool 'makeman' from HTML
229 source. The master documentation is at
230
231 http://netpbm.sourceforge.net/doc/pbmtextps.html
232
233netpbm documentation 15 June 2016 Pbmtextps User Manual(0)