home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / PRINTING / DVIPS54.ZIP / DVIPS / PC / AFM2TFM.DOC next >
Text File  |  1990-11-25  |  12KB  |  331 lines

  1.  
  2.  
  3.  
  4. AFM2TFM(1)        Pyramid OSx Operating System         AFM2TFM(1)
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      afm2tfm - convert Adobe font metrics to TeX font metrics
  10.  
  11. SSYYNNOOPPSSIISS
  12.      afm2tfm _f_o_o_1[._a_f_m] [ --ee _r_a_t_i_o ] [ --ss _s_l_a_n_t ] [ --tt _f_o_o_2[._t_f_m]
  13.      ] [ --vv _b_a_r[._v_p_l] | --VV _b_a_r[._v_p_l] ] [ _f_o_o_3[._t_f_m] ]
  14.  
  15. DDEESSCCRRIIPPTTIIOONN
  16.      PostScript fonts are (or should be) accompanied by font
  17.      metric files such as TTiimmeess--RRoommaann..aaffmm,, which describes the
  18.      characteristics of the font called Times-Roman.  To use such
  19.      fonts with TeX, we need TFM files that contain similar
  20.      information. The command
  21.  
  22.                afm2tfm Times-Roman.afm Times-Roman.tfm
  23.  
  24.      (which can be reduced to simply
  25.  
  26.                          afm2tfm Times-Roman
  27.  
  28.      by taking default shortcuts) will create the necessary file
  29.      TTiimmeess--RRoommaann..ttffmm,, which can then be moved to the directory
  30.      where TeX normally looks for font metric information. The
  31.      PostScript conversion program ddvviippss will also treat Times-
  32.      Roman as a resident PostScript font if you include the line
  33.  
  34.                              Times-Roman
  35.  
  36.      in the file _p_s_f_o_n_t_s._m_a_p.
  37.  
  38.      The file names used in this manual page are not consistent
  39.      with the new font naming scheme implemented by Karl Berry;
  40.      please refer to the main ddvviippss..tteexx documentation for the
  41.      correct names to use.
  42.  
  43.      PostScript fonts have a different encoding scheme from that
  44.      of plain TeX. Although both schemes are based on ASCII, spe-
  45.      cial characters such as ligatures and accents are handled
  46.      quite differently. Therefore we obtain best results by using
  47.      a "virtual font" interface, which makes TeX act as if the
  48.      PostScript font had a standard TeX encoding. Such a virtual
  49.      font can be obtained, for example, by the command
  50.  
  51.                      afm2tfm Times-Roman -v times
  52.  
  53.      or, more fully, by:
  54.  
  55.          afm2tfm Times-Roman.afm -v times.vpl Times-Roman.tfm
  56.  
  57.      This produces two outputs, namely the "virtual property
  58.      list" file ttiimmeess..vvppll and the TeX font metric file TTiimmeess--
  59.      Roman.tfm. The latter file describes an "actual font" on
  60.  
  61.  
  62.  
  63. Printed 11/25/90          9 August 1990                         1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. AFM2TFM(1)        Pyramid OSx Operating System         AFM2TFM(1)
  71.  
  72.  
  73.  
  74.      which the virtual font is based.
  75.  
  76.      If you wish to specify a different TFM file name than the
  77.      default, you can use the -t option; this will override any
  78.      default TFM file name that would be calculated from the
  79.      input file name.
  80.  
  81.      To use the font in TeX, you should first run
  82.  
  83.                  vptovf times.vpl times.vf times.tfm
  84.  
  85.      then install the file ttiimmeess..vvff in the directory for virtual
  86.      fonts and install ttiimmeess..ttffmm in the directory for TeX font
  87.      metrics. (You can also make more complex virtual fonts by
  88.      editing ttiimmeess..vvppll first.) Once this has been done, you're
  89.      all set. You can use code like this in TeX henceforth:
  90.  
  91.              \font\myfont=times at 10pt
  92.              \myfont
  93.              Hello, I am being typeset in Times-Roman.
  94.  
  95.  
  96.      Note that there are two fonts,  one  actual  (`Times-Roman',
  97.      which  is analogous to a raw piece of hardware) and one vir-
  98.      tual (`times', which has  typesetting  knowhow  added).  You
  99.      could  also  say  `\font\TR=Times-Roman at 10pt' and typeset
  100.      directly with that, but then you would have no ligatures  or
  101.      kerning, and you would have to use Adobe character positions
  102.      for special letters like \ae. The virtual font called  ttiimmeess
  103.      not only has ligatures and kerning, and most of the standard
  104.      accent conventions of TeX, it  also  has  a  few  additional
  105.      features not present in the Computer Modern fonts. For exam-
  106.      ple, it includes all the Adobe characters (such as the  Pol-
  107.      ish ogonek and the French guillemots). It also allows you to
  108.      type 58 accented letters from `Aacute'  to  `zcaron'  as  if
  109.      they  were  ligatures --- namely as `acute' followed by `A',
  110.      etc., where you can get `acute' (\char  19)  by  defining  a
  111.      suitable  control  sequence.  (The 58 constructed characters
  112.      are found in the AFM file, and constructed as  specified  by
  113.      Adobe;  you  may wish to adjust the spacing and/or add addi-
  114.      tional accent combinations by editing  the  VPL  file.)  The
  115.      only  things  you  lose from ordinary TeX text fonts are the
  116.      dotless j (which can  be  hacked  into  the  VPL  file  with
  117.      literal  PostScript  specials  if you have the patience) and
  118.      uppercase Greek letters (which just don't exist  unless  you
  119.      buy them separately).
  120.  
  121.      These fonts can be scaled to any size.  Go wild!  Note, how-
  122.      ever,  that using PostScript fonts does use up the printer's
  123.      virtual memory and it does take time.  You  may  find  down-
  124.      loading  the  Computer  Modern fonts to be faster than using
  125.      the built-in PostScript fonts!
  126.  
  127.  
  128.  
  129. Printed 11/25/90          9 August 1990                         2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. AFM2TFM(1)        Pyramid OSx Operating System         AFM2TFM(1)
  137.  
  138.  
  139.  
  140. OOPPTTIIOONNSS
  141.      Special effects are also obtainable, with commands such as
  142.  
  143.          afm2tfm Times-Roman -s .167 -v timessl Times-Slanted
  144.  
  145.      which create ttiimmeessssll..vvppll and TTiimmeess--SSllaanntteedd..ttffmm.. To use this,
  146.      proceed as above but put the line
  147.  
  148.      Times-Slanted "/Times-Roman .167 SlantFont"
  149.  
  150.      into _p_s_f_o_n_t_s._m_a_p. Then TTiimmeess--SSllaanntteedd will act as if it  were
  151.      a  resident  font,  although it is actually constructed from
  152.      Times-Roman by PostScript hackery. (It's an oblique  version
  153.      of  Times-Roman,  obtained by slanting everything 1/6 to the
  154.      right.) Similarly, you can get an extended font by
  155.  
  156.         afm2tfm Times-Extended -e 1.2 -v timesx Times-Extended
  157.  
  158.      and by recording the pseudo-resident font
  159.  
  160.      Times-Extended "/Times-Roman 1.2 ExtendFont"
  161.  
  162.      The command line switches are:
  163.  
  164.      --ee _r_a_t_i_o
  165.           All characters are stretched horizontally by the stated
  166.           _r_a_t_i_o;  if  it  is  less  than 1.0, you get a condensed
  167.           font.
  168.  
  169.      --ss _s_l_a_n_t
  170.           All characters are slanted to the right by  the  stated
  171.           _s_l_a_n_t; if it is negative, the letters slope to the left
  172.           (or they might be upright if you start with  an  italic
  173.           font).
  174.  
  175.      --vv _f_i_l_e[._v_p_l]
  176.           Generate a virtual property list (VPL) file as well  as
  177.           a TFM file.
  178.  
  179.      --VV _f_i_l_e[._v_p_l]
  180.           Same as -v, but the virtual font generated is  a  caps-
  181.           and-small-caps   font  obtained  by  scaling  uppercase
  182.           letters by .8 to typeset lowercase. This  font  handles
  183.           accented letters and retains proper kerning.
  184.  
  185.  
  186. NNOONN--RREESSIIDDEENNTT PPOOSSTTSSCCRRIIPPTT FFOONNTTSS
  187.      If you want to use a  non-printer-resident  PostScript  font
  188.      for  which  you  have a .pfb file (an Adobe Type 1 font pro-
  189.      gram), you can make it act like a resident font by putting a
  190.      `<'  sign  and the name of the .pfb file just after the font
  191.      name in the _p_s_f_o_n_t_s._m_a_p file entry. For example,
  192.  
  193.  
  194.  
  195. Printed 11/25/90          9 August 1990                         3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. AFM2TFM(1)        Pyramid OSx Operating System         AFM2TFM(1)
  203.  
  204.  
  205.  
  206.                    StoneInformal <StoneInformal.pfb
  207.  
  208.      will cause ddvviippss to include StoneInformal.pfb in your  docu-
  209.      ment  as  if  it  were  a  header file, whenever the pseudo-
  210.      resident font StoneInformal is used  in  a  document.  Simi-
  211.      larly,  you can generate transformed fonts and include lines
  212.      like
  213.  
  214.      StoneInformal-Condensed <StoneInformal.pfb "/StoneInformal .8 ExtendFont"
  215.  
  216.      in _p_s_f_o_n_t_s._m_a_p, in  which  case  StoneInformal.pfb  will  be
  217.      loaded   whenever  StoneInformal-Condensed  is  used.  (Each
  218.      header file is loaded at most once per document.   The  .pfb
  219.      files  should  be installed in the config directory with the
  220.      other header files.)
  221.  
  222.  
  223. FFOONNTT AALLIIAASSEESS
  224.      Some systems don't handle files with long names well---MSDOS
  225.      and TWENEX are two notable examples.  For this reason, ddvviippss
  226.      will accept an alias for such fonts.  Such an  alias  should
  227.      be the first word on the _p_s_f_o_n_t_s._m_a_p line.  For instance, if
  228.      we wanted the name _p_t_m_r to be used for _T_i_m_e_s-_R_o_m_a_n since our
  229.      computer can't handle long names, we would use the following
  230.      line in our _p_s_f_o_n_t_s._m_a_p file:
  231.  
  232.                            ptmr Times-Roman
  233.  
  234.      The TFM file must have the name _p_t_m_r._t_f_m.
  235.  
  236.      The parsing of the _p_s_f_o_n_t_s._m_a_p file should be  explained  to
  237.      eliminate all confusion.  Each line is separated into words,
  238.      where words are separated by spaces  or  tabs.   If  a  word
  239.      begins  with  a  double quote, however, it extends until the
  240.      next double quote or the end of the line.  If a word  starts
  241.      with  a  less than character, it is treated as a font header
  242.      file (or downloaded PostScript font).  If a word starts with
  243.      a  double  quote,  it is special instructions on how to gen-
  244.      erate that font.  Otherwise it is a name.   The  first  such
  245.      name  is  always  the name TeX uses for the font and is also
  246.      the name of the TFM file.  If there is  another  name  word,
  247.      that  name  is used as the PostScript name; if there is only
  248.      one name word, it is used for both  the  TeX  name  and  the
  249.      PostScript name.
  250.  
  251.      Note that the aliases  also  register  the  full  PostScript
  252.      name, so the single line
  253.  
  254.                            ptmr Times-Roman
  255.  
  256.      would allow ddvviippss to `find' the _p_t_m_r font  as  well  as  the
  257.      _T_i_m_e_s-_R_o_m_a_n font.
  258.  
  259.  
  260.  
  261. Printed 11/25/90          9 August 1990                         4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. AFM2TFM(1)        Pyramid OSx Operating System         AFM2TFM(1)
  269.  
  270.  
  271.  
  272.      Incidentally, many font  files  (e.g.,  in  the  Adobe  Type
  273.      Library)  include  more  characters  internally than you can
  274.      access directly without making a few changes.  These charac-
  275.      ters  typically  have  code  -1  in  the  afm  file  and  no
  276.      corresponding "constructed  character"  (CC)  specification.
  277.      For  example, in Adobe Garamond there are Eth and eth, Thorn
  278.      and thorn, plus things like copyright and onehalf,  plus  58
  279.      accented  letters Aacute thru zcaron (with accents over caps
  280.      much better  looking  than  you  can  get  from  constructed
  281.      accents). To use these characters, give them character codes
  282.      between 0 and 255 in the afm file, and build the correspond-
  283.      ing  EncodingVector (instead of StandardEncoding) in the pfb
  284.      file. Then afm2tfm will generate a vpl  file  that  includes
  285.      accented  characters  as  ligatures, as explained above; for
  286.      example, `Aacute' will be accessible as `acute' followed  by
  287.      `A' (as well as by its character code in the virtual font).
  288.  
  289. FFIILLEESS
  290.      _p_s_f_o_n_t_s._m_a_p in the config directory used  by  dvips  (update
  291.      this).
  292.      ../_a_f_m/_M_a_k_e_f_i_l_e in the dvips sources (look at this for exam-
  293.      ples).
  294.  
  295. SSEEEE AALLSSOO
  296.      dvips(1), tex(1), vptovf(1)
  297.  
  298. BBUUGGSS
  299.      An option to add  letterspacing  to  the  virtual  font  was
  300.      rejected  by Knuth because it would make the fi and fl liga-
  301.      tures break the normal rhythmic pattern.
  302.  
  303. AAUUTTHHOORRSS
  304.      Tomas Rokicki <rokicki@neon.stanford.edu> and Don Knuth
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327. Printed 11/25/90          9 August 1990                         5
  328.  
  329.  
  330.  
  331.