4.3BSD-UWisc/man/cat7/afm.7




AFM(7)              UNIX Programmer's Manual               AFM(7)



NAME
     AFM - Adobe POSTSCRIPT font metrics file format

DESCRIPTION
     AFM files are a standard interchange format for communicat-
     ing POSTSCRIPT font metric information to people and pro-
     grams.  The format is ASCII encoded (for both human and
     machine readability), machine independent, extensible, sim-
     ple to parse, and simple to generate.  AFM files are avail-
     able for all of Adobe Systems' POSTSCRIPT fonts.

     While somewhat verbose, the format is intended to be easily
     parsed, with the ability for applications to quickly skip
     over items that are not of interest.  It should be possible
     to create simple line-oriented parsing programs, or tools
     based on _a_w_k(1) or _s_e_d(1).

     Each AFM file contains the information for only one font
     face.  The file begins with global information about the
     font, followed by sections with character metrics.  The file
     format is line-oriented, each line beginning with a property
     (key) name, followed by the values for that property.  The
     general idea is to give key-value tuples (much like in a
     POSTSCRIPT font dictionary).

     The format is:
          Key [value value ...]
     Key names are case-sensitive.  All keys beginning with a
     capital letter are reserved by Adobe Systems.  The standard
     keys are detailed below, but other keys should be allowed
     and safely ignored by programs not recognizing them.  All
     standard keys begin with a capital letter.  User-defined
     non-standard entries should begin with a lower-case letter.

     The file begins with the line:
          StartFontMetrics _v_e_r_s_i_o_n
     The version described here is 1.0.  The last line of the
     file is:
          EndFontMetrics

     The following global font keys are defined.  Many of them
     are defined as in the top level or FontInfo subdictionary of
     a POSTSCRIPT font dictionary; their meanings are described
     in Appendix A of the POSTSCRIPT Language Manual.  All
     numeric values are in the (1000 unit per em) character coor-
     dinate system.

     FontName _s_t_r_i_n_g
                    The name of the font as presented to the
                    POSTSCRIPT findfont operator.

     FullName _s_t_r_i_n_g



Printed 1/10/87            12 Nov 1985                          1






AFM(7)              UNIX Programmer's Manual               AFM(7)



                    The ``print name'' of the font.

     FamilyName _s_t_r_i_n_g
                    The font family name.

     Weight _s_t_r_i_n_g  The weight of the font.

     ItalicAngle _r_e_a_l
                    The angle (in degrees counter-clockwise from
                    the vertical) of the dominant staffs of the
                    font.

     IsFixedPitch _b_o_o_l_e_a_n
                    Indicates monospaced (typewriter) fonts.

     FontBBox _l_l_x _l_l_y _u_r_x _u_r_y
                    Four integers giving the lower left corner
                    and the upper right corner of the font bound-
                    ing box.  _N_o_t_e: the bounding box given here
                    is that of the flattened paths, not of the
                    Bezier curve descriptions.

     UnderlinePosition _n_u_m_b_e_r
                    The position (from the baseline) to place an
                    underline.

     UnderlineThickness _n_u_m_b_e_r
                    Thickness of an underline stroke.

     Version _s_t_r_i_n_g Font version identifier.

     Notice _s_t_r_i_n_g  Font name trademark or copyright notice.

     Comment _s_t_r_i_n_g Comment strings may be ignored.

     EncodingScheme _s_t_r_i_n_g
                    a string indicating the default encoding vec-
                    tor for this font.  The most common one is
                    AdobeStandardEncoding.  Special fonts may
                    simply state ``FontSpecific''.  In the
                    future, other schemes may be employed.

     CapHeight _n_u_m_b_e_r
                    Top of capital H.

     XHeight _n_u_m_b_e_r Top of lower case x.

     Ascender _n_u_m_b_e_r
                    Top of lower case d.

     Descender _n_u_m_b_e_r
                    Bottom of lower case p.



Printed 1/10/87            12 Nov 1985                          2






AFM(7)              UNIX Programmer's Manual               AFM(7)



     The individual character metrics are surrounded with the
     lines StartCharMetrics and EndCharMetrics and consist of a
     list of keys and values separated by semicolons.  The char-
     acters are sorted (numeric ascending) by character code.
     Unencoded characters follow all of the encoded ones and are
     distinguished by having character code -1.  Each character
     gets one line of description. Standard keys are:

     C _n_u_m_b_e_r       decimal value of default POSTSCRIPT character
                    code (-1 if unencoded).

     WX _w_i_d_t_h-_x     Character width in _x (_y is 0).

     W _w_i_d_t_h-_x _w_i_d_t_h-_y
                    Character width vector.

     N _n_a_m_e         POSTSCRIPT character name.

     B _l_l_x _l_l_y _u_r_x _u_r_y
                    The character bounding box.

     L _s_u_c_c_e_s_s_o_r _l_i_g_a_t_u_r_e
                    A ligature sequence;  The current character
                    may join with the character named _s_u_c_c_e_s_s_o_r
                    to form the character named _l_i_g_a_t_u_r_e.  Note
                    that characters may have more than one such
                    entry.

     Most western language fonts have WX entries rather than W
     ones.  Note that keys are one letter for brevity.  Here too,
     the set is extensible, with unknown entries ignored.  (This
     leaves room for addition of new information, for example.) A
     future revision of this format will have a specification for
     kerning information.

FILES
     /usr/misc/lib/ps/*.afm
                    AFM files in the TRANSCRIPT distribution.

SEE ALSO
     awk(1), sed(1).

AUTHOR
     Adobe Systems Incorporated

NOTES
     POSTSCRIPT and TRANSCRIPT are trademarks of Adobe Systems
     Incorporated.







Printed 1/10/87            12 Nov 1985                          3