home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / fonts-faq / part16 < prev    next >
Encoding:
Internet Message Format  |  1996-08-15  |  20.5 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!news.mathworks.com!zombie.ncsc.mil!newsgate.duke.edu!news-feed-1.peachnet.edu!paperboy.wellfleet.com!news3.near.net!amber.ora.com!not-for-mail
  2. From: norm@ora.com (Norman Walsh)
  3. Newsgroups: comp.fonts,comp.answers,news.answers
  4. Subject: comp.fonts FAQ: Utilities
  5. Supersedes: <font-faq-16_817479312@ora.com>
  6. Followup-To: poster
  7. Date: 14 Aug 1996 10:35:35 -0400
  8. Organization: O'Reilly and Associates, Inc.
  9. Lines: 519
  10. Sender: norm@ruby.ora.com
  11. Approved: news-answers-request@MIT.Edu
  12. Distribution: world
  13. Expires: 27 Sep 1996 14:34:08 GMT
  14. Message-ID: <font-faq-16_840033248@ora.com>
  15. References: <font-faq-1_840033248@ora.com>
  16. Reply-To: norm@ora.com (Norman Walsh)
  17. NNTP-Posting-Host: ruby.ora.com
  18. Summary: This posting answers frequently asked questions about fonts.
  19.          It addresses both general font questions and questions that
  20.          are specific to a particular platform.
  21. X-Web-Homepage: http://www.ora.com/homepages/comp.fonts/
  22. Xref: senator-bedfellow.mit.edu comp.fonts:48313 comp.answers:20527 news.answers:79248
  23.  
  24. Archive-name: fonts-faq/part16
  25. Version: 2.1.5
  26.  
  27. Subject: 11. Utilities Information
  28.   
  29.   I have just started collecting information about font utilities.  I
  30.   will gladly add any information that you can pass my way.  Please send
  31.   your submissions to norm.
  32.   
  33.   I would appreciate it if you could include a paragraph or so of
  34.   description and the appropriate site/filename for retrieval.
  35.   
  36. Subject: 11.1. How do I convert AFM files to PFM files
  37.   
  38.   You can get afm2pfm and pfm2afm files from
  39.   http://www.ora.com/homepages/comp.fonts/FAQ-tools.html.
  40.   
  41. Subject: 11.2. PS2PK
  42.   
  43.   PS2PK is a utility for converting Type1 postscript fonts into TeX PK
  44.   files.  The source code is distributed and it has been compiled for
  45.   both *nix boxes and MS-DOS based machines.
  46.   
  47.   Here is the original announcement:
  48.   
  49.                             Ps2pk-1.2 available
  50.                             -------------------
  51.                                  (June 1992)
  52.        
  53.        Version 1.2 of ps2pk is now available on:
  54.        ftp.urc.tue.nl (address: 131.155.2.79)
  55.        directory:    /pub/tex
  56.        files:        ps2pk12.README         (  1k)    This file
  57.                      ps2pk12.tar.Z          (391k)    Sources
  58.                      ps2pk386.zip           (232k)    MSDOS executables
  59.                      utopia.tar.Z           (342k)    Adobe Utopia font family
  60.                      courier.tar.Z          (207k)    IBM Courier font family
  61.        
  62.        For people having difficulties in handling UNIX `.tar.Z' format I
  63.        have made some UNIX tools (only executables) available in:
  64.        directories:  /pub/unixtools/dos
  65.                      /pub/unixtools/vms
  66.        
  67.        See the system specific TARZ file for some help.
  68.        
  69.        Ftp.urc.tue.nl can not handle E-mail requests. But sites are free
  70.        to put the ps2pk12 stuff on any server that can.
  71.   
  72.   When do you need ps2pk?
  73.   =======================
  74.   
  75.   Ps2pk is a tool that converts a PostScript type1 font into a corres-
  76.   ponding TeX PK font.  The tool is especially interesting if you want to
  77.   use fully hinted type1 fonts in your DVI previewer (instead of the
  78.   unhinted type1 fonts currently used in GhostScript) or on a printer
  79.   that has no PostScript interpreter.
  80.   
  81.   In order to use the ps2pk generated fonts your driver and previewer need
  82.   to support virtual fonts.  The reason is that PostScript fonts and TeX
  83.   fonts do have a different font encoding and handle ligatures in a
  84.   different way.  With virtual fonts the PostScript world (encoding +
  85.   ligatures) can be mapped to the old style TeX world on which the current
  86.   plain macro packages still are based (despite the fact that TeX3.0 can
  87.   handle 8bits).
  88.   
  89.   It is also possible to use the ps2pk generated PK fonts directly
  90.   
  91. Subject: 11.3. TeX Utilities
  92.   
  93.   There are many TeX font utilities.  For TeX related questions, I direct
  94.   you to comp.text.tex or the Info-TeX mailing list.  I will happily list
  95.   any utilities here that the comp.fonts public feels should be present.
  96.   I am listing MetaFont because it is the obvious font-specific component
  97.   of TeX and PKtoSFP because it allows anyone to use PS2PK to create
  98.   LaserJet softfonts.
  99.   
  100.   Liam R. E. Quin is the original author of the MetaFont section.  It has
  101.   been hacked at a bit by norm to make it fit the tone of the comp.fonts
  102.   FAQ.  Assume that norm is responsible for any errors, not Liam.
  103.   
  104.   MetaFont
  105.   ========
  106.   
  107.   About MetaFont:
  108.   ---------------
  109.   
  110.   Metafont is a programming language for describing fonts.  It was
  111.   written by Donald Knuth and is documented in
  112.   
  113.          Computers & Typesetting/C: The METAFONTbook
  114.          Knuth, Donald E.
  115.          Addison Wesley, 1986
  116.          ISBN 0-201-13445-4, or 0-201-13444-6 (soft cover)
  117.          Library access: Z250.8.M46K58, or 686.2'24, or 85-28675.
  118.   
  119.   A font written in MetaFont is actually a computer program which, when
  120.   run, will generate a bitmap (`raster') for a given typeface at a given
  121.   size, for some particular device.
  122.   
  123.   What do you need in order to use the fonts:
  124.   -------------------------------------------
  125.   
  126.   You cannot print the MetaFont fonts directly (unless you want a listing
  127.   of the program, that is).  Instead, you must generate a bitmap font and
  128.   use that to print something.
  129.   
  130.   If you are using TeX, the sequence of steps is something like this:
  131.   
  132.   MF to MetaFont to GF
  133.        Convert a MetaFont program into a bitmapped font.  Also produces a
  134.           TFM file.
  135.   
  136.   MF to MetaFont to TFM
  137.        Covnert a MetaFont program into a TFM file.  Also produces     a
  138.        GF bitmapped font.
  139.   
  140.   GF to GFtoPK to PK
  141.        Convert a GF bitmapped font into a compressed PK font.
  142.   
  143.   TEX + TFM to TeX to DVI
  144.        Produce a device independent output file.
  145.   
  146.   DVI + PK to dvi driver to output format
  147.        Produce a device-specific output file (or preview).
  148.   
  149.   The above steps are idealized.  In reality, you have to make sure that
  150.   the fonts get installed in the correct places and you may have to
  151.   adjust description files, etc.  The friendly folks on comp.text.tex can
  152.   probably get it staightened out for you if you can't find a local guru.
  153.   
  154.   If you are not using TeX, it's almost impossible to predict.  At some
  155.   point in the above sequence, you'll insert some other conversion
  156.   program and proceed differently.  Here, for example, is how you might
  157.   use TeX fonts with WordPerfect and a LaserJet printer.
  158.   
  159.   PK to PKtoSFP to SFP
  160.        Convert a TeX PK file into an HP LaserJet softfont.
  161.   
  162.   SFP to SFP2Auto to TFM
  163.        Make HP AutoFont Tagged Font Metric file.
  164.   
  165.   SFP + HP AutoFont TFM to PTR to Installed in WP
  166.        Install the new font in WordPerfect.
  167.   
  168.   Use WordPerfect as you normally would.
  169.   
  170. Subject: 11.4. MFPic
  171.   
  172.   MFpic is a macro package for including pictures in TeX documents.  The
  173.   idea behind this package is to have Metafont do the actual drawing, and
  174.   store the pictures in a font that TeX can include in the document.  The
  175.   macros have been designed so that the user should never have to learn
  176.   Metafont to use these macros--the TeX macros actually write the
  177.   Metafont file for you.
  178.   
  179. Subject: 11.5. fig2MF
  180.   
  181.   Briefly, fig2MF uses the mfpic macros to create formatted, commented MF
  182.   code from the fig graphics language. This means that programs like xfig
  183.   can be used as interactive font creation tools. I wrote fig2MF so that
  184.   I could portably illustrate TeX documents, but I suppose one could use
  185.   it to design letterforms as well.
  186.   
  187.   The package consists of a single C source code file, modified mfpic
  188.   macros, documentation, and sample fig files.  It is available at the
  189.   shsu archives.
  190.   
  191. Subject: 11.6. GNU Font Utilities
  192.   
  193.   Here is a brief description of the programs included:
  194.   
  195.      * imageto extracts a bitmap font from an image in PBM or IMG format,
  196.        or   converts the image to Encapsulated PostScript.
  197.   
  198.      * xbfe is a hand-editor for bitmap fonts which runs under X11.
  199.   
  200.      * charspace adds side bearings to a bitmap font.
  201.   
  202.      * limn fits outlines to bitmap characters.
  203.   
  204.      * bzrto converts a generic outline font to Metafont or PostScript.
  205.   
  206.      * gsrenderfont renders a PostScript outline font at a particular
  207.        point   size and resolution, yielding a bitmap font.
  208.   
  209.      * fontconvert can rearrange or delete characters in a bitmap font,
  210.        filter them, split them into pieces, combine them, etc., etc.
  211.   
  212.      * imgrotate rotates or flips an IMG file.
  213.   
  214.   We need volunteers to help create fonts for the GNU project.  You do not
  215.   need to be an expert type designer to help, but you do need to know
  216.   enough about TeX and/or PostScript to be able to install and test new
  217.   fonts.  Example: if you know neither (1) the purpose of TeX utility
  218.   program `gftopk' nor (2) what the PostScript `scalefont' command does,
  219.   you probably need more experience before you can help.
  220.   
  221.   If you can volunteer, the first step is to compile the font utilities.
  222.   After that, contact me [ed: Karl Berry] (karl@gnu.ai.mit.edu).  I will
  223.   get you a scanned type specimen image.  The manual explains how to use
  224.   these utilities to turn that into a font you can use in TeX or
  225.   PostScript.
  226.   
  227.   You can get the source by ftp from any GNU archive site.
  228.   
  229.   You can also order tapes with GNU software from the Free Software
  230.   Foundation (thereby supporting the GNU project); send mail to
  231.   gnu@prep.ai.mit.edu for the latest prices and ordering information, or
  232.   retrieve the file DISTRIB from a GNU archive.
  233.   
  234.   This is Info file compfont.info, produced by Makeinfo-1.55 from the
  235.   input file FAQ.texinfo.
  236.   
  237. Subject: 11.7. Font Editors
  238.   
  239.      * Editors for BDF fonts
  240.   
  241.        There is a bdf font editor that comes with HP/Apollo workstations.
  242.        It's called 'edfont'.  It's not the best but it works.
  243.   
  244.        Gary reports:
  245.   
  246.        The standard X distribution for X11R5 contains "xfed", which
  247.        allows you to play with BDF fonts.  "xfedor" has a more elaborate
  248.        user interface, and is available on most contrib directories.
  249.   
  250.        The last time I tried:
  251.   
  252.        "xfedor" couldn't handle BDF files with more than 256 characters.
  253.   
  254.        "xfed" aborts if the BDF file contains a COMMENT line with no other
  255.        text.  The workaround is to edit the BDF file, to put text after
  256.        the word COMMENT.  A single blank space is sufficient.  For some
  257.        reason, the standard BDF files included in the X release contain
  258.        blank spaces on the otherwise empty COMMENT lines.  It was
  259.        probably easier to add the space to the COMMENT lines of every BDF
  260.        file than it was to fix the lex code for xfed.  :-)
  261.   
  262.      * Editors for PK fonts
  263.   
  264.        The GNU font utilities include an X-based editor called Xbfe which
  265.        edits bitmapped fonts under X.
  266.   
  267.        Eberhard Mattes' emTeX includes PKedit.
  268.   
  269. Subject: 11.8. The T1 Utilities
  270.   
  271.   This is a snippet from the README file for I. Lee Hetherington's
  272.   t1utils package:
  273.   
  274.   t1utils is a collection of simple type-1 font manipulation programs.
  275.   Together, they allow you to convert between PFA (ASCII) and PFB
  276.   (binary) formats, disassemble PFA or PFB files into human-readable
  277.   form, reassemble them into PFA or PFB format.  Additionally you can
  278.   extract font resources from a Macintosh font file (ATM/Laserwriter).
  279.   
  280. Subject: 11.9. Where to get bitmap versions of the fonts
  281.   
  282.   There are archives containing the bitmaps of many of these fonts at
  283.   various sizes and resolutions.  The fonts must have been generated for
  284.   the correct print engine: e.g. write-white or write-black.  The
  285.   archives generally hold only the sizes used by TeX.  These are
  286.   `magstep' sizes, and are not exact point sizes.  It is probably better
  287.   to generate them from the Metafont sources yourself if you can.
  288.   
  289.   The best place to look for raster fonts was almost certainly:
  290.   mims-iris.waterloo.edu
  291.   
  292.   but it isn't any more, the fonts have all gone.  Let me know if you
  293.   find them elsewhere.  Most people seem to have moved to using
  294.   PostScript fonts or Bitstream ones instead now.
  295.   
  296.   Some other sites are:
  297.   
  298.          ftp.cica.indiana.edu
  299.          mac.archive.umich.edu
  300.          ftp.shsu.edu
  301.          ftp.tex.ac.uk
  302.          ftp.dante.de
  303.   
  304.   The occasional posting of ftp sites to comp.misc and comp.archives
  305.   lists these and several other sites.
  306.   
  307. Subject: 11.10. Converting between font formats
  308.   
  309.   Conversions to and from pbm and pk format were posted to comp.text.tex
  310.   and to alt.sources on the 9th of August, 1990 by Angus Duggan.  The
  311.   program is pbmtopk, and there are also at least two patches.
  312.   
  313.   Chris Lewis' psroff package includes a program to go from pk both to
  314.   the HP LaserJet and to PostScript.
  315.   
  316.   John McClain <ophelp@tamvenus.bitnet> has some conversion programs for
  317.   various graphics formats to/and from pk files.
  318.   
  319.   A PC program, CAPTURE, turns HPGL files into PK format, US$130 from
  320.   Micro Programs Inc., 251 Jackson Ave., Syosset, NY 11791 U.S.A.
  321.   
  322.   Metaplot can take pen-plotter files and prouce metafont files.  Note:
  323.   Pat Wilcox is no longer at Ohio State.
  324.   
  325.   Kinch Computer Company sell .pk fonts derived from PostScript fonts.
  326.   Kinch Computer Co., 501 S. Meadow St.Ithaca, NY 14850 U.S.A.
  327.   telephone: +1 607 273 0222; fax: +1 607 273 0484
  328.   
  329. Subject: 11.11. Getting fonts by FTP and Mail
  330.   
  331.   If you are using ftp, you will need either the name of the host or the
  332.   Internet number.  For example, to connect to ftp.ora.com, listed as
  333.   ftp: ftp.ora.com [198.112.208.11] you will need to type something like
  334.   
  335.                               ftp ftp.ora.com
  336.   
  337.   If that doesn't work, try using the number:
  338.   
  339.                             ftp 198.112.208.11
  340.   
  341.   If that doesn't work, on Unix systems you can use nslookup (it's
  342.   usually /usr/etc/nslookup) to find the host number - it might have
  343.   changed.  Type the entire host name, and after a few seconds nslookup
  344.   will give you the address.  Of course, if you have nslookup installed,
  345.   the first form will probably work...
  346.   
  347.   Once you have connected, you will need to go to the appropriate
  348.   directory, lists its contents, and retrieve the files.
  349.   
  350.   Most of the machines listed here run Unix, and you use "ls" and "cd" to
  351.   list files and to change directories.  On machines that run VMS, you
  352.   will have to put square brackets around directory names, like [this].
  353.   
  354.   Remember that although Metafont sources are text files, pk fonts are
  355.   not ASCII, and you will have to use binary mode for them.  In general,
  356.   use text mode for README files and *.mf files, and binary mode for
  357.   other font files.  Files ending in .Z are compressed binary files - you
  358.   will need to use binary mode, and then uncompress the files when you
  359.   get them.
  360.   
  361.   There is an ftp-by-mail BITNET service, BITFTP, for BITNET users.
  362.   
  363.   Before getting large files by mail, please remember to get permission
  364.   from all intervening sites.  Ask your site administrator, who can send
  365.   mail to Postmaster at each site on the way if necessary.
  366.   
  367. Subject: 11.12. MetaFont to PostScript Conversion
  368.   
  369.   There are (I believe) three programs that perform this task.  At least
  370.   one of them is called "mf2ps".  If you have any more information about
  371.   these tools, please let me know.
  372.   
  373.   Chang Jin-woong reports that he found the "mf2ps" package with Archie.
  374.   It is written by Shimon Yanai <yanai@israearn.bitnet> and Daniel M.
  375.   Berry <dberry@cs.technion.ac.il>. The source programs are written in
  376.   Pascal.
  377.   
  378.   MetaFog, a commercial conveter by Richard Kinch, is available on request
  379.   to TrueTeX owners.
  380.   
  381. Subject: 11.13. How to use Metafont fonts with Troff
  382.   
  383.   If, when you run troff, you get the message `typesetter busy', you have
  384.   the original Ossanna-troff, also called otroff.  Chris Lewis has a
  385.   package which will let you use TeX fonts with troff - it's called
  386.   psroff, and comes with documentation.
  387.   
  388.          ftp: gatekeeper.dec.com (16.1.0.2) pub/misc/psroff-3.0
  389.          ftp: ftp.cs.toronto.edu [128.100.1.105] pub/psroff-3.0/*
  390.   
  391.   If, when you run troff, you get something like this:
  392.   
  393.          x T 300
  394.          x res 300 1 1
  395.   
  396.   you have ditroff.  This is sometimes called titroff or psroff.  In this
  397.   case, you will probably need to do the following:
  398.   
  399.     1. convert the font to your printer's format
  400.   
  401.     2. generate a width table for the font
  402.   
  403.     3. add the font to the DESC file for the appropriate device
  404.   
  405.     4. arrange for troff to download the font
  406.   
  407.     5. tell troff about the font by running `makedev DESC' in the
  408.        right place.
  409.   
  410.   If, when you run troff, you get something like this:
  411.   
  412.          X hp(SCM)(CM)(AF)(AD) 300 1 1
  413.          Y P default letter 2550 3300 0 0 90 90 2460 3210
  414.   
  415.   you have sqtroff:
  416.   
  417.     1. convert the font to your printer's format
  418.   
  419.     2. generate a width table for the font
  420.   
  421.     3. add the font to the DESC file for the appropriate device
  422.   
  423.     4. put the font in the appropriate raster directory
  424.   
  425.     5. tell sqtroff about the font by running `sqmakedev DESC' or
  426.        `sqinstall'.
  427.   
  428.   In each case, you should be able to get help from your vendor.
  429.   
  430.   Note that Chris Lewis' psroff package has software to make width tables
  431.   for troff from pk files.
  432.   
  433. Subject: 11.14. PKtoBDF / MFtoBDF
  434.   
  435.   From the SeeTeX distribution, programs to help previewers under X11.
  436.   They convert TeX PK files into X11 BDF fonts (which can be further
  437.   converted into one or more server native formats).
  438.   
  439. Subject: 11.15. PKtoPS
  440.   
  441.   Included in the psroff distribution, this utility converts PK fonts
  442.   into PostScript fonts (bitmaps, I presume).  If you have any more
  443.   information about these tools, please let me know.
  444.   
  445. Subject: 11.16. PKtoSFP / SFPtoPK
  446.   
  447.   Convert fonts from TeX PK format to HP LaserJet softfont (bitmap)
  448.   format.
  449.   
  450. Subject: 11.17. PostScript to MetaFont
  451.   
  452.   ps2mf started out as a way of creating bitmaps via MF for TeX. Only,
  453.   when I had just finished it, Piet Tutelaers came with ps2pk. This was a
  454.   far superior way runtime-wise. He uses the IBM X11-R5 fontutilities
  455.   library, which is extremely ugly code. But, it works. So, to generate
  456.   bitmaps, I suggest everyone use ps2pk.
  457.   
  458.   To generate a MF outline description, ps2mf is *the* tool. Yannis
  459.   Haralambous has just started a project where he wants to create
  460.   meta-ized fonts for MF from Postscript descriptions. ps2mf does the
  461.   basic conversion. This project wants to revive the use of MF for it is
  462.   a truly beautiful program with enormous possiblities.
  463.   
  464.   The following information comes from the README file for ps2mf:
  465.   
  466.   This is pfb2mf. It is a copyleft program. See the file COPYING for more
  467.   details. I suggest that for the translation of Type-One to readable
  468.   PostScript you use I. Lee Hetherington's Type-1-Utils. You can find
  469.   these somewhere on obelix.icce.rug.nl in pub/erikjan.
  470.   
  471.   If you find any bugs, please do report.
  472.   
  473.   If you have any complaints, please do report.
  474.   
  475.   Now for some info about the different stages. This package contains
  476.   four programs:
  477.   
  478.      * pfb2pfa
  479.   
  480.      * pfa2chr
  481.   
  482.      * chr2ps
  483.   
  484.      * ps2mf
  485.   
  486.   pfb2pfa
  487.   =======
  488.   
  489.   pfb2pfa will decompress an IBM (!) Postscript type 1 fontfile into
  490.   readable           and downloadable hexadecimal data.
  491.   
  492.   The resulting file still contains two layers of encryption:
  493.   
  494.      * eexec encryption
  495.   
  496.      * charstring encryption
  497.   
  498.   pfa2chr
  499.   =======
  500.   
  501.   pfa2chr will do an eexec-decryption of a readable hexadecimal font file
  502.   to a   fontfile with encrypted charstrings.
  503.   
  504.   chr2ps
  505.   ======
  506.   
  507.   chr2ps will perform a charstring-decryption of a font file with
  508.   encrypted   charstrings to fontfile with postscript commands for type 1
  509.   fonts.
  510.   
  511.   With a "-" as filename, these programs will read from <stdin> and write
  512.   to <stdout>. This way you can pipe the results, as in:
  513.   
  514.          pfb2pfa garmnd - | pfa2chr - - | chr2ps - garmnd
  515.   
  516.   This will create a garmnd.ps from garmnd.pfb without explicitely
  517.   creating the intermediate files.
  518.   
  519.   These previous stages can be replaced by (when using Lee Hetherington's
  520.   type-1-utils):
  521.   
  522.   t1disasm garmnd.pfb garmnd.ps
  523.   
  524.   ps2mf
  525.   =====
  526.   
  527.   This last stage will convert to a MetaFont program with the use of the
  528.   corresponding .afm file and a mapping configuration file. It can
  529.   convert   to an ordinary form with Bezier controlpoints. It can also
  530.   generate a curl   specification. For this last option specifify -C.
  531.   
  532. Subject: 11.18. Mac Bitmaps to BDF Format
  533.   
  534.   I [ed: who?] have posted a program which I hacked together for
  535.   extracting all NFNT and FONT resources from a MacBinary form of a
  536.   standard Mac file and dumping the fonts as Adobe BDF files.  It has only
  537.   been compiled and tested on a Sun system to date.  It can be fetched
  538.   from METIS.COM, /pub/mac2bdf.c.
  539.   
  540.   I wrote this tool to be able to use Mac Bitmaps under X Windows and
  541.   OpenWindows (which take Adobe BDF format files).
  542.   
  543.