Updated version to 1.0.3.
[zpb-ttf.git] / doc / index.html
blob0e76ea587e255c03c74b728d679e0b05d584a50b
1 <html>
2 <head>
3 <title>ZPB-TTF - TrueType font file access for Common Lisp</title>
4 <style type='text/css'>
5 a, a:visited { text-decoration: none }
6 a[href]:hover { text-decoration: underline }
7 pre { background: #DDD; padding: 0.25em }
8 </style>
10 <body>
12 <h2>ZPB-TTF - TrueType font file access for Common Lisp</h2>
14 <blockquote>
15 <h3>Abstract</h3>
17 <p>TrueType fonts have a <a
18 href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6.html">publicly</a>
20 href="http://www.microsoft.com/OpenType/OTSpec/otff.htm">documented</a>
21 file format. ZPB-TTF is a TrueType file parser that provides an
22 interface for reading typographic metrics, glyph outlines, and other
23 information from the file. It is available under a BSD-like
24 license.
26 The latest version is 1.0.3, released on July 18th, 2013.
28 <p>TrueType is a registered trademark of Apple Computer, Inc.
30 <p style='color: red'>Download shortcut: <a href='http://www.xach.com/lisp/zpb-ttf.tgz'>http://www.xach.com/lisp/zpb-ttf.tgz</a>
32 </blockquote>
34 <h3>Contents</h3>
36 <ol>
37 <li> <a href='#sect-limitations'>Limitations</a>
38 <li> <a href='#sect-overview'>Overview</a>
39 <li><a href='#sect-glyph-example'>Glyph Example</a>
40 <li> <a href='#sect-dictionary'>The ZPB-TTF Dictionary</a>
42 <ol>
43 <li> <a href='#open-font-loader'><tt>open-font-loader</tt></a>
44 <li> <a href='#close-font-loader'><tt>close-font-loader</tt></a>
45 <li> <a href='#with-font-loader'><tt>with-font-loader</tt></a>
46 <li> <a href='#glyph-count'><tt>glyph-count</tt></a>
47 <li> <a href='#name-entry-value'><tt>name-entry-value</tt></a>
48 <li> <a href='#find-name-entry'><tt>find-name-entry</tt></a>
49 <li> <a href='#value'><tt>value</tt></a>
50 <li> <a href='#italic-angle'><tt>italic-angle</tt></a>
51 <li> <a href='#underline-thickness'><tt>underline-thickness</tt></a>
52 <li> <a href='#underline-position'><tt>underline-position</tt></a>
53 <li> <a href='#fixed-pitch-p'><tt>fixed-pitch-p</tt></a>
54 <li> <a href='#units/em'><tt>units/em</tt></a>
55 <li> <a href='#ascender'><tt>ascender</tt></a>
56 <li> <a href='#descender'><tt>descender</tt></a>
57 <li> <a href='#line-gap'><tt>line-gap</tt></a>
58 <li> <a href='#postscript-name'><tt>postscript-name</tt></a>
59 <li> <a href='#full-name'><tt>full-name</tt></a>
60 <li> <a href='#family-name'><tt>family-name</tt></a>
61 <li> <a href='#subfamily-name'><tt>subfamily-name</tt></a>
62 <li> <a href='#all-kerning-pairs'><tt>all-kerning-pairs</tt></a>
63 <li> <a href='#glyph-exists-p'><tt>glyph-exists-p</tt></a>
64 <li> <a href='#index-glyph'><tt>index-glyph</tt></a>
65 <li> <a href='#find-glyph'><tt>find-glyph</tt></a>
66 <li> <a href='#bounding-box'><tt>bounding-box</tt></a>
67 <li> <a href='#xmin-and-friends'><tt>xmin</tt></a>
68 <li> <a href='#xmin-and-friends'><tt>ymin</tt></a>
69 <li> <a href='#xmin-and-friends'><tt>xmax</tt></a>
70 <li> <a href='#xmin-and-friends'><tt>ymax</tt></a>
71 <li> <a href='#x-and-friends'><tt>x</tt></a>
72 <li> <a href='#x-and-friends'><tt>y</tt></a>
73 <li> <a href='#on-curve-p'><tt>on-curve-p</tt></a>
74 <li> <a href='#contour-count'><tt>contour-count</tt></a>
75 <li> <a href='#contour'><tt>contour</tt></a>
76 <li> <a href='#contours'><tt>contours</tt></a>
77 <li> <a href='#do-contours'><tt>do-contours</tt></a>
78 <li> <a href='#explicit-contour-points'><tt>explicit-contour-points</tt></a>
79 <li> <a href='#do-contour-segments'><tt>do-contour-segments</tt></a>
80 <li> <a href='#do-contour-segments*'><tt>do-contour-segments*</tt></a>
81 <li> <a href='#code-point'><tt>code-point</tt></a>
82 <li> <a href='#font-index'><tt>font-index</tt></a>
83 <li> <a href='#advance-width'><tt>advance-width</tt></a>
84 <li> <a href='#left-side-bearing'><tt>left-side-bearing</tt></a>
85 <li> <a href='#right-side-bearing'><tt>right-side-bearing</tt></a>
86 <li> <a href='#kerning-offset'><tt>kerning-offset</tt></a>
87 <li> <a href='#string-bounding-box'><tt>string-bounding-box</tt></a>
88 </ol>
90 <li><a href='#sect-feedback'>Feedback</a>
92 </ol>
95 <a name='sect-limitations'><h3>Limitations</h3></a>
97 <p>ZPB-TTF has the following limitations:
99 <ul>
101 <li>is not a rasterizer; it will not produce bitmaps
103 <li>is not a scaler; all units are unscaled values directly from the
104 font file
106 <li>only works with fonts that have a Unicode character map
108 <li>has been tested on a limited number of fonts
110 </ul>
114 <a name='sect-overview'><h3>Overview</h3></a>
116 <p>Font files are loaded by creating <i>font loaders</i>. A font
117 loader has information that applies to the font as a whole, such as
118 its overall bounding box and other typographic metrics, the number of
119 glyphs it contains, and a character map that can be used to convert a
120 character set index into a glyph index meaningful to the font loader.
122 <p>A font loader can also be used to create and find <i>glyphs</i>. A
123 glyph object has information about an individual glyph such as
124 typographic metrics and its outline.
126 <p>Glyph outlines are made up of arrays of <i>control points</i>. An
127 array of control points is called a <i>contour</i>. Contours define
128 the shape of the glyph. For example, in most fonts, the glyph for the
129 character <tt>#\I</tt> has one contour defining its outline. The glyph
130 for the character <tt>#\O</tt> has two contours: one for the outer
131 edge, and one for the inner edge.
133 <p>This documentation is not meant to be a substitute for the TrueType
134 file format documentation. For file format details, see the
135 specifications from either <a
136 href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6.html">Apple</a>
137 or <a
138 href="http://www.microsoft.com/OpenType/OTSpec/otff.htm">Microsoft</a>.
141 <a name='sect-glyph-example'><h3>Glyph Example</h3></a>
143 <p><img src="lambda.png">
145 <p>This image is a rendering of the Greek small letter lambda (U+03BB)
146 from the <a href="http://www.identifont.com/show?WP">Times New
147 Roman</a> TrueType font. The visualization was programmed by Frederic
148 Jolliton and rendered
149 with <a href="http://projects.tuxee.net/cl-vectors">CL-VECTORS</a>.
151 <p>The dark gray grid lines represent the axes of the glyph coordinate
152 system. Light grid lines are drawn at intervals of 256 em-square
153 units.
155 <p>Black squares represent the control points returned from <a
156 href='#contour'><tt>CONTOUR</tt></a>. Solid black squares are points
157 on the outline (<a href='#on-curve-p'><tt>ON-CURVE-P</tt></a> returns
158 <i>true</i>), and hollow black squares are not on the outline. Solid
159 red squares represent implicit control points on the glyph outline;
160 they are not in the original contour, but they would be returned in a
161 new contour created with <a
162 href='#explicit-contour-points'><tt>EXPLICIT-CONTOUR-POINTS</tt></a>.
164 <p>The alternating blue and green portions of the glyph outline
165 represent the separate segments whose start, control, and end points
166 were bound with <a
167 href='#do-contour-segments'><tt>DO-CONTOUR-SEGMENTS</tt></a>.
170 <a name='sect-dictionary'><h3>The ZPB-TTF Dictionary</h3></a>
172 <p><a name='open-font-loader'>[Function]</a><br>
173 <b>open-font-loader</b> <i>font-file-designator</i> => <i>font-loader</i>
175 <blockquote>
176 Creates and returns a font-loader object from
177 <i>font-file-designator</i>, which should be either a pathname,
178 pathname namestring, a stream, or a font-loader object.
179 </blockquote>
182 <p><a name='close-font-loader'>[Function]</a><br>
183 <b>close-font-loader</b> <i>font-loader</i> =>
185 <blockquote>
186 Closes any open resources held by <i>font-loader</i>.
187 </blockquote>
190 <p><a name='with-font-loader'>[Macro]</a><br>
191 <b>with-font-loader</b> <i>(font-loader font-loader-designator)</i> <tt>&body</tt> <i>body</i> =>
193 <blockquote>
194 Performs <i>body</i> with <i>font-loader</i> bound to a font-loader
195 object created as if with <tt>(open-font-loader</tt>
196 <i>font-loader-designator</i></tt>). Automatically closes the
197 font-loader when finished.
198 </blockquote>
201 <p><a name="glyph-count">[Function]</a><br>
202 <b>glyph-count</b> <i>font-loader</i> => <i>number</i>
204 <blockquote>
205 Returns the number of glyphs available in <i>font-loader</i>.
206 </blockquote>
209 <p><a name='name-entry-value'>[Function]</a><br>
210 <b>name-entry-value</b> <i>name-designator</i> <i>font-loader</i> => <i>string</i>
212 <blockquote>
213 Returns an entry from the TrueType "name" table, which contains
214 human-readable values for copyright info, trademark notices, creator
215 names, and the like.
217 <p><i>name-designator</i> may be either an integer ID from the table of
218 NameIDs in the <a
219 href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html">TrueType
220 "name" table specification</a>, or a keyword designating such an
221 ID. Valid keywords and their IDs are:
223 <p><table cellpadding=3 cellspacing=0>
224 <tr><th>Keyword</th><th align=right>&nbsp; ID</th></tr>
225 <tr><td><tt>:COPYRIGHT-NOTICE</tt></td><td align=right>0</td></tr>
226 <tr><td><tt>:FONT-FAMILY</tt></td><td align=right>1</td></tr>
227 <tr><td><tt>:FONT-SUBFAMILY</tt></td><td align=right>2</td></tr>
228 <tr><td><tt>:UNIQUE-SUBFAMILY</tt></td><td align=right>3</td></tr>
229 <tr><td><tt>:FULL-NAME</tt></td><td align=right>4</td></tr>
230 <tr><td><tt>:NAME-TABLE-VERSION</tt></td><td align=right>5</td></tr>
231 <tr><td><tt>:POSTSCRIPT-NAME</tt></td><td align=right>6</td></tr>
232 <tr><td><tt>:TRADEMARK-NOTICE</tt></td><td align=right>7</td></tr>
233 <tr><td><tt>:MANUFACTURER-NAME</tt></td><td align=right>8</td></tr>
234 <tr><td><tt>:DESIGNER</tt></td><td align=right>9</td></tr>
235 <tr><td><tt>:DESCRIPTION</tt></td><td align=right>10</td></tr>
236 <tr><td><tt>:VENDOR-URL</tt></td><td align=right>11</td></tr>
237 <tr><td><tt>:DESIGNER-URL</tt></td><td align=right>12</td></tr>
238 <tr><td><tt>:LICENSE-DESCRIPTION</tt></td><td align=right>13</td></tr>
239 <tr><td><tt>:LICENCE-INFO-URL</tt></td><td align=right>14</td></tr>
240 <tr><td><tt>:RESERVED</tt></td><td align=right>15</td></tr>
241 <tr><td><tt>:PREFERRED-FAMILY</tt></td><td align=right>16</td></tr>
242 <tr><td><tt>:PREFERRED-SUBFAMILY</tt></td><td align=right>17</td></tr>
243 <tr><td><tt>:COMPATIBLE-FULL</tt></td><td align=right>18</td></tr>
244 <tr><td><tt>:SAMPLE-TEXT</tt></td><td align=right>19</td></tr>
245 </table>
247 <p>If the font does not provide any "name" table entry for the given
248 <i>name-designator</i>, returns <tt>NIL</tt>.
250 </blockquote>
253 <p><a name='find-name-entry'>[Function]</a><br>
254 <b>find-name-entry</b> <i>platform-id language-id name-id font-loader</i> => <i>name-entry</i>
256 <blockquote>
257 This is the low-level interface used by <a
258 href="#name-entry-value"><tt>NAME-ENTRY-VALUE</tt></a>. <i>platform-id</i>,
259 <i>language-id</i>, and <i>name-id</i> should be integer ID values from the <a
260 href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html">TrueType
261 "name" table specification</a>. If the combination of IDs is found in
262 the name table, a name-entry object is returned, otherwise
263 <tt>NIL</tt> is returned.
264 </blockquote>
267 <p><a name='value'>[Function]</a><br>
268 <b>value</b> <i>name-entry</i> => <i>string</i>
270 <blockquote>
271 Returns the string value of a name-entry object.
272 </blockquote>
275 <p><a name="italic-angle">[Function]</a><br>
276 <b>italic-angle</b> <i>font-loader</i> => <i>number</i>
278 <blockquote>
279 Returns the typographic italic angle of <i>font-loader</i>.
280 </blockquote>
283 <p><a name="underline-thickness">[Function]</a><br>
284 <b>underline-thickness</b> <i>font-loader</i> => <i>number</i>
286 <blockquote>
287 Returns the typographic underline thickness of <i>font-loader</i>.
288 </blockquote>
291 <p><a name="underline-position">[Function]</a><br>
292 <b>underline-position</b> <i>font-loader</i> => <i>number</i>
294 <blockquote>
295 Returns the typographic underline position of <i>font-loader</i>.
296 </blockquote>
298 <p><a name='fixed-pitch-p'>[Function]</a><br>
299 <b>fixed-pitch-p</b> <i>font-loader</i> => <i>boolean</i>
301 <blockquote>
302 Returns <i>true</i> if <i>font-loader</i> is fixed pitch (all glyphs
303 have the same width).
304 </blockquote>
307 <p><a name="units/em">[Function]</a><br>
308 <b>units/em</b> <i>font-loader</i> => <i>number</i>
310 <blockquote>
311 Return the number of units in the typographic em-square of
312 <i>font-loader</i>.
313 </blockquote>
316 <p><a name='ascender'>[Function]</a><br>
317 <b>ascender</b> <i>font-loader</i> => <i>number</i>
319 <blockquote>
320 Returns the typographic ascender value of <i>font-loader</i>.
321 </blockquote>
324 <p><a name='descender'>[Function]</a><br>
325 <b>descender</b> <i>font-loader</i> => <i>number</i>
327 <blockquote>
328 Returns the typographic descender value of <i>font-loader</i>.
329 </blockquote>
332 <p><a name='line-gap'>[Function]</a><br>
333 <b>line-gap</b> <i>font-loader</i> => <i>number</i>
335 <blockquote>
336 Returns the typographic line gap of <i>font-loader</i>.
337 </blockquote>
340 <p><a name='postscript-name'>[Generic function]</a><br>
341 <b>postscript-name</b> <i>object</i> => <i>string</i>
343 <blockquote>
344 Returns the Postscript name of <i>object</i>, which may be a glyph or a
345 font-loader.
346 </blockquote>
349 <p><a name='full-name'>[Function]</a><br>
350 <b>full-name</b> <i>font-loader</i> => <i>string</i>
352 <blockquote>
353 Returns the full name of <i>font-loader</i>.
354 </blockquote>
357 <p><a name='family-name'>[Function]</a><br>
358 <b>family-name</b> <i>font-loader</i> => <i>string</i>
360 <blockquote>
361 Returns the family name of <i>font-loader</i>.
362 </blockquote>
365 <p><a name='subfamily-name'>[Function]</a><br>
366 <b>subfamily-name</b> <i>font-loader</i> => <i>string</i>
368 <blockquote>
369 Returns the subfamily name of <i>font-loader</i>.
370 </blockquote>
372 <p><a name='all-kerning-pairs'>[Function]</a><br>
373 <b>all-kerning-pairs</b> <i>font-loader</i> => <i>list</i>
375 <blockquote>
376 Returns a list of all the kerning pairs available in
377 <i>font-loader</i>. Each element of the list is itself a list, with
378 three elements: a left glyph, a right glyph, and a numeric kerning
379 offset.
380 </blockquote>
383 <p><a name="glyph-exists-p">[Function]</a><br>
384 <b>glyph-exists-p</b> <i>character-designator font-loader</i> => <i>boolean</i>
386 <blockquote>
387 Returns <i>true</i> if <i>font-loader</i> has glyph data for
388 <i>character-designator</i>.
389 </blockquote>
392 <p><a name='index-glyph'>[Function]</a><br>
393 <b>index-glyph</b> <i>index</i> <i>font-loader</i> => <i>glyph</i>
395 <blockquote>
396 Returns the glyph at <i>index</i> in <i>font-loader</i>.
397 </blockquote>
400 <p><a name='find-glyph'>[Function]</a><br>
401 <b>find-glyph</b> <i>character-designator</i> <i>font-loader</i> => <i>glyph</i>
403 <blockquote>
404 Returns the glyph for <i>character-designator</i> in
405 <i>font-loader</i>. If
406 <i>character-designator</i> is an integer, it is treated as a Unicode
407 code-point and the corresponding glyph is fetched from the font. If
408 <i>character-designator</i> is a character, its <tt>char-code</tt> is used as
409 a Unicode code-point for lookup.<br><b>Note:</b> If the
410 <tt>char-code</tt>s of characters the Lisp implementation do not
411 correspond to Unicode (or a subset), this may not return the expected
412 glyph.
414 <p>If <i>font-loader</i> does not contain any glyphs for
415 <i>character-designator</i>, the "missing glyph" glyph is returned. To
416 test for the existence of a glyph without returning the "missing
417 glyph" glyph, use <a
418 href="#glyph-exists-p"><tt>GLYPH-EXISTS-P</tt></a>.
420 </blockquote>
423 <p><a name='bounding-box'>[Generic function]</a><br>
424 <b>bounding-box</b> <i>object</i> => <i>#(xmin ymin xmax ymax)</i>
426 <blockquote>
427 Returns the bounding box of <i>object</i>, which may be a glyph or a
428 font-loader.
429 </blockquote>
432 <p><a name='xmin-and-friends'>[Generic functions]</a><br>
433 <b>xmin</b> <i>object</i> => <i>value</i><br>
434 <b>ymin</b> <i>object</i> => <i>value</i><br>
435 <b>xmax</b> <i>object</i> => <i>value</i><br>
436 <b>ymax</b> <i>object</i> => <i>value</i><br>
438 <blockquote>
439 Returns the horizontal and vertical extreme values for <i>object</i>, which
440 may be a glyph or font-loader. If <i>object</i> is a four-element vector,
441 each function is an accessor to the appropriate entry in the vector.
442 </blockquote>
445 <p><a name='x-and-y'>[Function]</a><br>
446 <b>x</b> <i>control-point</i> => <i>number</i><br>
447 <b>y</b> <i>control-point</i> => <i>number</i>
449 <blockquote>
450 Returns the respective coordinate of <i>control-point</i>.
451 </blockquote>
454 <p><a name='on-curve-p'>[Function]</a><br>
455 <b>on-curve-p</b> <i>control-point</i> => <i>boolean</i>
457 <blockquote>
458 Returns <i>true</i> if <i>control-point</i> is on the contour outline.
459 </blockquote>
462 <p><a name='contour-count'>[Function]</a><br>
463 <b>contour-count</b> <i>glyph</i> => <i>number</i>
465 <blockquote>
466 Returns the number of contours of <i>glyph</i>. Some glyphs, such as the
467 glyph for the Space character, may have zero contours.
468 </blockquote>
471 <p><a name='contour'>[Function]</a><br>
472 <b>contour</b> <i>glyph</i> <i>index</i> => <i>vector</i>
474 <blockquote>
475 Returns the <i>index</i>th contour from the contours of
476 <i>glyph</i>. A contour is represented as a vector of control point
477 objects. Each control point may be on (touching) or off (not touching)
478 the the contour outline.
480 <p>TrueType files may store contours that have implicit control
481 points. When two consecutive control points are off the contour
482 outline, there is an implied control point at the midpoint between
483 them on the contour curve.
484 </blockquote>
487 <p><a name='contours'>[Function]</a><br>
488 <b>contours</b> <i>glyph</i> => <i>vector</i>
490 <blockquote>
491 Returns all contours of glyph as a vector.
492 </blockquote>
495 <p><a name='do-contours'>[Macro]</a><br>
496 <b>do-contours</b> <i>(contour glyph</i> <tt>&optional</tt>
497 <i>result)</i> <tt>&body</tt> <i>body</i> => <i>result</i>
499 <blockquote>
500 Performs <i>body</i> for each contour in <i>glyph</i>, with the
501 contour bound to <i>contour</i>. Returns <i>result</i> (evaluated) at
502 the end of processing.
503 </blockquote>
506 <p><a name="explicit-contour-points">[Function]</a><br>
507 <b>explicit-contour-points</b> <i>contour</i> => <i>vector</i>
509 <blockquote>
510 Returns a vector of points that is the same as <i>contour</i> with the implicit
511 contour points inserted.
512 </blockquote>
515 <p><a name="do-contour-segments">[Macro]</a><br>
516 <b>do-contour-segments</b> <i>(start control end) contour</i> <tt>&body</tt> <i>body</i> =>
518 <blockquote>
519 For convenience, a TrueType contour may be thought of as being made up
520 of connected segments. Each segment is either a straight line from one
521 point on the outline to another, or a curved line that starts with a
522 point on the outline, is controlled by a point off the outline, and
523 ends with a point on the outline.
525 <p><tt>DO-CONTOUR-SEGMENTS</tt> performs <i>body</i> for each segment of
526 <i>contour</i>, with the <i>start</i>, <i>control</i>, and <i>end</i>
527 variables (not evaluated) bound to the start, control, and end points
528 of the segment. If the segment is a straight line, <i>control</i> is
529 bound to <tt>NIL</tt>.
531 <p>Contours of a glyph in a TrueType file may contain implied control
532 points; two consecutive points off the outline may be treated as if
533 there is there is an point on the outline at the midpoint between
534 them. <tt>DO-CONTOUR-SEGMENTS</tt> synthesizes and binds any implicit
535 points as needed when going through the contour segments. (See the <a
536 href='#sect-glyph-example'>Glyph Example</a> for a visual explanation.)
538 <p>Segments are not a TrueType glyph concept. The term is used for
539 convenience by ZPB-TTF.
541 </blockquote>
544 <p><a name="do-contour-segments*">[Macro]</a><br>
545 <b>do-contour-segments*</b> <i>(control end) contour</i> <tt>&body</tt> <i>body</i> =>
547 <blockquote>
548 <tt>DO-CONTOUR-SEGMENTS*</tt> is like <a
549 href="#do-contour-segments"><tt>DO-CONTOUR-SEGMENTS</tt></a>, except it does
550 not bind a start variable.
551 </blockquote>
554 <p><a name='code-point'>[Function]</a><br>
555 <b>code-point</b> <i>glyph</i> => <i>number</i>
557 <blockquote>
558 Returns the Unicode code point of a character <i>glyph</i>
559 represents. <b>Note:</b> Since font glyphs may represent more than one
560 character, this value may not be exactly what you expect. <b>Note:</b>
561 Since glyphs in a font do not necessarily correspond to a code point,
562 or to a single code point, this may not always return a meaningful
563 value.
564 </blockquote>
567 <p><a name='font-index'>[Function]</a><br>
568 <b>font-index</b> <i>glyph</i> => <i>number</i>
570 <blockquote>
571 Returns the integer index of <i>glyph</i> in its font loader.
572 </blockquote>
575 <p><a name='advance-width'>[Function]</a><br>
576 <b>advance-width</b> <i>glyph</i> => <i>number</i>
578 <blockquote>
579 Returns the typographic advance width of <i>glyph</i>.
580 </blockquote>
583 <p><a name='left-side-bearing'>[Function]</a><br>
584 <b>left-side-bearing</b> <i>glyph</i> => <i>number</i>
586 <blockquote>
587 Returns the typographic left side bearing of <i>glyph</i>.
588 </blockquote>
591 <p><a name='right-side-bearing'>[Function]</a><br>
592 <b>right-side-bearing</b> <i>glyph</i> => <i>number</i>
594 <blockquote>
595 Returns the typographic right side bearing of <i>glyph</i>.
596 </blockquote>
599 <p><a name='kerning-offset'>[Function]</a><br>
600 <b>kerning-offset</b> <i>left-glyph</i> <i>right-glyph</i>
601 <i>font-loader</i> => <i>number</i>
603 <blockquote>
604 Returns the typographic kerning adjustment needed for the advance
605 width when <i>left-glyph</i> and <i>right-glyph</i> appear next to
606 each other.
607 </blockquote>
610 <p><a name='string-bounding-box'>[Function]</a><br>
611 <b>string-bounding-box</b> <i>string</i> <i>font-loader</i>
612 <tt>&amp;key</tt> (<i>kerning</i> <tt><i>t</i></tt>) =>
613 <i>#(xmin ymin xmax ymax)</i>
615 <blockquote>
616 Returns the bounding box for <i>string</i> in the natural unit size of
617 <i>font-loader</i>. If <i>kerning</i> is <i>true</i>, the inter-glyph
618 spacing will take kerning offsets into account when calculating the
619 bounding box.
620 </blockquote>
623 <a name='sect-feedback'><h3>Feedback</h3></a>
625 <p>Please send bug reports, patches, questions, and any other feedback
626 to <a href="mailto:xach@xach.com">Zachary Beane</a>.