1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html>
<head>
<title>Libnetpbm PBM Font Function Manual</title>
<meta name="manual_section" content="3">
</head>
<body>
<h1>Libnetpbm PBM Font Function Manual</h1>
Updated: April 2018
<br>
<p><a href="#toc">Table Of Contents</a>
<?makeman .SH NAME ?>
<?makeman libnetpbm_font \- Libnetpbm PBM Font Function Manual ?>
<?makeman .SH DESCRIPTION ?>
<p>This reference manual covers functions in the <b>libnetpbm</b> library for
accessing fonts to draw text characters, using the PBM image format and the
<b>libnetpbm</b> in-memory image formats.
<p>We actually have very little information here; this is mainly a
framework for adding documentation later if someone becomes interested
in this facility.
<p>Note that the primary known user of this library is the Netpbm program
<b>pbmtext</b>. You can use that program's source code as an example.
<h2 id="fontobject">Font Object</h2>
<p><b>libnetpbm</b> represents a font with an object of type
<b>struct font</b>. The library provides functions to create these objects.
<p>The object these functions create is in newly allocated memory and you
can't actually free it. The memory may be in multiple pieces, pointing to
each other, and <b>libnetpbm</b> provides no destroy function. (This is only
because of implementation laziness).
<h2 id="thefunctions">The Functions</h2>
<p>The functions are all declared in the <b>pbmfont.h</b> header file.
<h3 id="pbm_defaultfont"><b>pbm_defaultfont</b></h3>
<h4>Synopsis</h4>
<pre>
<code>
struct font *
pbm_defaultfont(const char * which);
</code>
</pre>
<h4>Description</h4>
<p>This returns a font object representing a font built in to <b>libnetpbm</b>.
<p><i>which</i> is the name of the desired built-in font. There are two:
<dl>
<dt>bdf
<dd>A proportional font similar to Adobe's <b>timR12</b> font
<dt>fixed
<dd>A fixed space font
</dl>
<h4>Copyright</h4>
<p>The provenance of the built-in fonts are not known for sure, but in 2018,
the <b>bdf</b> font was almost identical to a font on which Adobe and
Digital Equipment Corporation once claimed copyright. That font was
available in the
<a href="ftp://ftp.x.org/pub/current/src/font/">X.org source code</a> in a
collection named "font-adobe-75dpi", in a file named
<b>timR12.pcf.gz</b>.
<p>Ergo, it is likely that the font was copied into Netpbm from that font in
1991.
<p>You may need a copyright license from the copyright owners of that original
font not only to copy the <b>libnetpbm</b> code, but to execute it, thus
generating copies of the glyphs of the font.
<p>The X.org files in 2018 indicate the following copyright claims, along
with a license to the public to copy them:
<blockquote>
<p>
Copyright 1984-1989, 1994 Adobe Systems Incorporated.
Copyright 1988, 1994 Digital Equipment Corporation.
<p>
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notices appear in all
copies and that both those copyright notices and this permission
notice appear in supporting documentation, and that the names of
Adobe Systems and Digital Equipment Corporation not be used in
advertising or publicity pertaining to distribution of the software
without specific, written prior permission. Adobe Systems and
Digital Equipment Corporation make no representations about the
suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
</blockquote>
<h3 id="pbm_dissectfont"><b>pbm_dissectfont</b></h3>
<h3 id="pbm_loadfont"><b>pbm_loadfont</b></h3>
<p>This function returns a font object for a font described in a file. The
file may be either a special PBM file or a BDF file. The function determines
which it is and behaves as either <b>pbm_loadpbmfont</b>
or <b>pbm_loadbdffont</b> accordingly.
<h3 id="pbm_loadpbmfont"><b>pbm_loadpbmfont</b></h3>
<h3 id="pbm_loadbdffont2"><b>pbm_loadbdffont2</b></h3>
<h3 id="pbm_loadbdffont"><b>pbm_loadbdffont</b></h3>
<p>This is obsolete. New programs should use <b>pbm_loadbdffont2</b>
instead.
<h3 id="pbm_expandbdffont"><b>pbm_expandbdffont</b></h3>
<h3 id="pbm_dumpfont"><b>pbm_dumpfont</b></h3>
<hr>
<h2 id="toc">Table Of Contents</h2>
<ul>
<li><a href="#fontobject">Font Object</a>
<li><a href="#thefunctions">The Functions</a>
<ul>
<li><a href="#pbm_defaultfont">pbm_defaultfont</a>
<li><a href="#pbm_dissectfont">pbm_dissectfont</a>
<li><a href="#pbm_loadfont">pbm_loadfont</a>
<li><a href="#pbm_loadpbmfont">pbm_loadpbmfont</a>
<li><a href="#pbm_loadbdffont2">pbm_loadbdffont2</a>
<li><a href="#pbm_loadbdffont">pbm_loadbdfont</a>
<li><a href="#pbm_expandbdffont">pbm_expandbdffont</a>
<li><a href="#pbm_dumpfont">pbm_dumpfont</a>
</ul>
</ul>
</body>
</html>
|