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, the two images will be the same height with the text baseline in
49       the same place.  With -topmargin and -bottommargin, that may not be the
50       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
60       If  you have -ascent, there is probably no point in specifying -topmar‐
61       gin too, but if you do, the effect is cumulative.  The same is true  of
62       -descent and -bottommargin.
63
64       -pad  pads the image on the top and bottom to the where the highest and
65       lowest characters in the font would reach, even if you don't have those
66       characters  in your text.  This is useful if you will generate multiple
67       images of text (with multiple invocations of pbmtextps) and concatenate
68       them  vertically to create a multiline text image.  -pad makes sure the
69       lines in this image are equally spaced.
70
71       Example:
72
73           $ pbmtextps 'cat'   | pamfile
74           $ pbmtextps 'Catty' | pamfile
75
76
77       The commands above, with no -pad, show that the 'Catty' image is higher
78       because capital C reaches high and 'y' reaches low.
79
80           $ pbmtextps -pad 'cat'   | pamfile
81           $ pbmtextps -pad 'Catty' | pamfile
82
83
84       The  commands  above,  with  -pad,  show  that both images are the same
85       height.
86
87       If you specify -pad with -ascent or -descent, the larger value  is  ef‐
88       fective.
89
90       -crop makes the program crop all sides to the far edge of the type.  It
91       is the same as -leftmargin=0  -rightmargin=0  -topmargin=0  -bottommar‐
92       gin=0.
93
94       You cannot specify any other margin-affecting options with -crop.
95
96       The  default  top margin, when you specify neither -ascent, -topmargin,
97       nor -pad, is as if you specified topmargin=0.
98
99       The default bottom margin, when you specify neither -descent,  -bottom‐
100       margin, nor -pad, is as if you specified -descent=1.5*fontsize.
101
102       The  default left margin, when you do not specify -leftmargin, is as if
103       you specified -leftmargin=0.5*fontsize.
104
105       The default right margin, when you do not specify -rightmargin,  is  as
106       if you specified -rightmargin=0.
107
108
109

OPTIONS

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

USAGE

218       You can generate antialiased text by using a larger resolution than the
219       default and scaling the image down using pamscale.
220
221       See the manual for the similar pbmtext for more advice on usage.
222
223

HISTORY

225       pbmtextps was added to Netpbm in Release 10.0 (June 2002).
226
227
228

SEE ALSO

230       pbmtext(1), pamcut(1),  pnmcrop(1),  pamcomp(1),  ppmchange(1),  pnmro‐
231       tate(1), pamscale(1), ppmlabel(1), pbm(1)
232
233

AUTHOR

235       Copyright (C) 2002 by James McCann
236

DOCUMENT SOURCE

238       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
239       source.  The master documentation is at
240
241              http://netpbm.sourceforge.net/doc/pbmtextps.html
242
243netpbm documentation             15 June 2016         Pbmtextps User Manual(0)
Impressum