Penguin
Annotated edit history of pbmtext(1) version 1 showing authors affecting page license. View with all changes included.
Rev Author # Line
1 perry 1 pbmtext
2 !!!pbmtext
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 USAGE
8 SEE ALSO
9 AUTHOR
10 ----
11 !!NAME
12
13
14 pbmtext - render text into a bitmap
15 !!SYNOPSIS
16
17
18 __pbmtext__ [[__-font__ ''fontfile'']
19 [[__-builtin__ ''fontname''] [[__-space__
20 ''pixels''] [[''text'']
21 !!DESCRIPTION
22
23
24 Takes the specified text, either a single line from the
25 command line or multiple lines from standard input, and
26 renders it into a bitmap.
27
28
29 In the bitmap, each line of input is a line of output.
30 Formatting characters such as newline have no effect on the
31 formatting; like any unprintable character, they turn into
32 spaces.
33
34
35 The bitmap is just wide enough for the longest line of text,
36 plus margins, and just high enough to contain the lines of
37 text, plus margins. The left and right margins are twice the
38 width of the widest character in the font; the top and
39 bottom margins are the height of the tallest character in
40 the font. But if the text is only one line, all the margins
41 are half of this.
42 !!OPTIONS
43
44
45 __-font__,__-builtin__
46
47
48 By default, pbmtext uses a built-in font called bdf (about a
49 10 point Times-Roman font). You can use a fixed width font
50 by specifying __-builtin fixed__.
51
52
53 You can also specify your own font with the __-font__
54 flag. The ''fontfile'' is either a BDF file from the X
55 window system or a PBM file.
56
57
58 If the ''fontfile'' is a PBM file, it is created in a
59 very specific way. In your window system of choice, display
60 the following text in the desired (fixed-width)
61 font:
62
63
64 M
65 Do a screen grab or window dump of that text, using for instance __xwd__, __xgrabsc__, or __screendump__. Convert the result into a pbm file. If necessary, use __pnmcut__ to remove everything except the text. Finally, run it through __pnmcrop__ to make sure the edges are right up against the text. __pbmtext__ can figure out the sizes and spacings from that.
66
67
68 __-space__ ''pixels''
69
70
71 Add ''pixels'' pixels of space between characters. This
72 is in addition to whatever space surrounding characters is
73 built into the font, which is usually enough to produce a
74 reasonable string of text.
75
76
77 ''pixels'' may be negative to crowd text together, but
78 the author has not put much thought or testing into how this
79 works in every possible case, so it might cause disastrous
80 results.
81 !!USAGE
82
83
84 Often, you want to place text over another image. One way to
85 do this is with __ppmlabel__. __ppmlabel__ does not
86 give you the font options that __pbmtext__ does,
87 though.
88
89
90 Another way is to use __pbmtext__ to create an image
91 containing the text, then use __pnmcomp__ to overlay the
92 text image onto your base image. To make only the text (and
93 not the entire rectangle containing it) cover the base
94 image, you will need to give __pnmcomp__ a mask, via its
95 __-alpha__ option. You can just use the text image itself
96 as the mask, as long as you also specify the __-invert__
97 option to __pnmcomp__.
98
99
100 If you want to overlay colored text instead of black, just
101 use __ppmchange__ to change all black pixels to the color
102 of your choice before overlaying the text image. But still
103 use the original black and white image for the alpha
104 mask.
105
106
107 If you want the text at an angle, use __pnmrotate__ on
108 the text image (and alpha mask) before
109 overlaying.
110 !!SEE ALSO
111
112
113 pnmcut(1), pnmcrop(1), pnmcomp(1),
114 ppmchange(1), pnmrotate(1),
115 ppmlabel(1), pbm(5)
116 !!AUTHOR
117
118
119 Copyright (C) 1993 by Jef Poskanzer and George
120 Phillips
121 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.