home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / answers / fonts-faq / part12 < prev    next >
Internet Message Format  |  1993-09-22  |  21KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!spool.mu.edu!howland.reston.ans.net!math.ohio-state.edu!caen!nic.umass.edu!ymir.cs.umass.edu!ymir.cs.umass.edu!usenet
  2. From: walsh@cs.umass.edu (Norman Walsh)
  3. Newsgroups: comp.fonts,news.answers
  4. Subject: comp.fonts FAQ: Utilities
  5. Supersedes: <font-faq-12_748294975@cs.umass.edu>
  6. Followup-To: poster
  7. Date: 22 Sep 1993 15:12:26 GMT
  8. Organization: Dept. of Computer Science, Univ. of Mass (Amherst)
  9. Lines: 524
  10. Approved: news-answers-request@MIT.Edu
  11. Distribution: world
  12. Expires: 5 Nov 1993 15:10:25 GMT
  13. Message-ID: <font-faq-12_748710625@cs.umass.edu>
  14. References: <font-faq-1_748710625@cs.umass.edu>
  15. Reply-To: walsh@cs.umass.edu (Norman Walsh)
  16. NNTP-Posting-Host: ibis.cs.umass.edu
  17. Summary: This posting answers frequently asked questions about fonts.
  18.          It addresses both general font questions and questions that
  19.          are specific to a particular platform.
  20. Xref: senator-bedfellow.mit.edu comp.fonts:10182 news.answers:12797
  21.  
  22. Archive-name: fonts-faq/part12
  23. Version: 2.0.2
  24.  
  25. Subject: 10. Utilities
  26.   
  27.   I have just started collecting information about font utilities.  I
  28.   will gladly add any information that you can pass my way.  Please send
  29.   your submissions to norm.
  30.   
  31.   I would appreciate it if you could include a paragraph or so of
  32.   description and the appropriate site/filename for retrieval.
  33.   
  34. Subject: 10.1. PS2PK
  35.   
  36.   PS2PK is a utility for converting Type1 postscript fonts into TeX PK
  37.   files.  The source code is distributed and it has been compiled for
  38.   both *nix boxes and MS-DOS based machines.
  39.   
  40.   Here is the original announcement:
  41.   
  42.                             Ps2pk-1.2 available
  43.                             -------------------
  44.                                  (June 1992)
  45.        
  46.        Version 1.2 of ps2pk is now available on:
  47.        ftp.urc.tue.nl (address: 131.155.2.79)
  48.        directory:    /pub/tex
  49.        files:        ps2pk12.README         (  1k)    This file
  50.                      ps2pk12.tar.Z          (391k)    Sources
  51.                      ps2pk386.zip           (232k)    MSDOS executables
  52.                      utopia.tar.Z           (342k)    Adobe Utopia font family
  53.                      courier.tar.Z          (207k)    IBM Courier font family
  54.        
  55.        For people having difficulties in handling UNIX `.tar.Z' format I
  56.        have made some UNIX tools (only executables) available in:
  57.        directories:  /pub/unixtools/dos
  58.                      /pub/unixtools/vms
  59.        
  60.        See the system specific TARZ file for some help.
  61.        
  62.        Ftp.urc.tue.nl can not handle E-mail requests. But sites are free
  63.        to put the ps2pk12 stuff on any server that can.
  64.   
  65.   When do you need ps2pk?
  66.   =======================
  67.   
  68.   Ps2pk is a tool that converts a PostScript type1 font into a corres-
  69.   ponding TeX PK font.  The tool is especially interesting if you want to
  70.   use fully hinted type1 fonts in your DVI previewer (instead of the
  71.   unhinted type1 fonts currently used in GhostScript) or on a printer
  72.   that has no PostScript interpreter.
  73.   
  74.   In order to use the ps2pk generated fonts your driver and previewer need
  75.   to support virtual fonts.  The reason is that PostScript fonts and TeX
  76.   fonts do have a different font encoding and handle ligatures in a
  77.   different way.  With virtual fonts the PostScript world (encoding +
  78.   ligatures) can be mapped to the old style TeX world on which the current
  79.   plain macro packages still are based (despite the fact that TeX3.0 can
  80.   handle 8bits).
  81.   
  82.   It is also possible to use the ps2pk generated PK fonts directly
  83.   
  84.   In addition, a modified version of PS2PK exists on ibis.cs.umass.edu.  I
  85.   have added some hacks to better support really large renderings and a
  86.   primitive "range" facility.
  87.   
  88. Subject: 10.2. TeX Utilities
  89.   
  90.   There are many TeX font utilities.  For TeX related questions, I direct
  91.   you to comp.text.tex or the Info-TeX mailing list.  I will happily list
  92.   any utilities here that the comp.fonts public feels should be present.
  93.   I am listing MetaFont because it is the obvious font-specific component
  94.   of TeX and PKtoSFP because it allows anyone to use PS2PK to create
  95.   LaserJet softfonts.
  96.   
  97.   Liam R. E. Quin is the original author of the MetaFont section.  It has
  98.   been hacked at a bit by norm to make it fit the tone of the comp.fonts
  99.   FAQ.  Assume that norm is responsible for any errors, not Liam.
  100.   
  101.   MetaFont
  102.   ========
  103.   
  104.   About MetaFont:
  105.   ---------------
  106.   
  107.   Metafont is a programming language for describing fonts.  It was
  108.   written by Donald Knuth and is documented in
  109.   
  110.          Computers & Typesetting/C: The METAFONTbook
  111.          Knuth, Donald E.
  112.          Addison Wesley, 1986
  113.          ISBN 0-201-13445-4, or 0-201-13444-6 (soft cover)
  114.          Library access: Z250.8.M46K58, or 686.2'24, or 85-28675.
  115.   
  116.   A font written in MetaFont is actually a computer program which, when
  117.   run, will generate a bitmap (`raster') for a given typeface at a given
  118.   size, for some particular device.
  119.   
  120.   What do you need in order to use the fonts:
  121.   -------------------------------------------
  122.   
  123.   You cannot print the MetaFont fonts directly (unless you want a listing
  124.   of the program, that is).  Instead, you must generate a bitmap font and
  125.   use that to print something.
  126.   
  127.   If you are using TeX, the sequence of steps is something like this:
  128.   
  129.   MF to MetaFont to GF
  130.        Convert a MetaFont program into a bitmapped font.  Also produces a
  131.           TFM file.
  132.   
  133.   MF to MetaFont to TFM
  134.        Covnert a MetaFont program into a TFM file.  Also produces     a
  135.        GF bitmapped font.
  136.   
  137.   GF to GFtoPK to PK
  138.        Convert a GF bitmapped font into a compressed PK font.
  139.   
  140.   TEX + TFM to TeX to DVI
  141.        Produce a device independent output file.
  142.   
  143.   DVI + PK to dvi driver to output format
  144.        Produce a device-specific output file (or preview).
  145.   
  146.   The above steps are idealized.  In reality, you have to make sure that
  147.   the fonts get installed in the correct places and you may have to
  148.   adjust description files, etc.  The friendly folks on comp.text.tex can
  149.   probably get it staightened out for you if you can't find a local guru.
  150.   
  151.   If you are not using TeX, it's almost impossible to predict.  At some
  152.   point in the above sequence, you'll insert some other conversion
  153.   program and proceed differently.  Here, for example, is how you might
  154.   use TeX fonts with WordPerfect and a LaserJet printer.
  155.   
  156.   PK to PKtoSFP to SFP
  157.        Convert a TeX PK file into an HP LaserJet softfont.
  158.   
  159.   SFP to SFP2Auto to TFM
  160.        Make HP AutoFont Tagged Font Metric file.
  161.   
  162.   SFP + HP AutoFont TFM to PTR to Installed in WP
  163.        Install the new font in WordPerfect.
  164.   
  165.   Use WordPerfect as you normally would.
  166.   
  167. Subject: 10.3. MFPic
  168.   
  169.   MFpic is a macro package for including pictures in TeX documents.  The
  170.   idea behind this package is to have Metafont do the actual drawing, and
  171.   store the pictures in a font that TeX can include in the document.  The
  172.   macros have been designed so that the user should never have to learn
  173.   Metafont to use these macros--the TeX macros actually write the
  174.   Metafont file for you.
  175.   
  176. Subject: 10.4. fig2MF
  177.   
  178.   Briefly, fig2MF uses the mfpic macros to create formatted, commented MF
  179.   code from the fig graphics language. This means that programs like xfig
  180.   can be used as interactive font creation tools. I wrote fig2MF so that
  181.   I could portably illustrate TeX documents, but I suppose one could use
  182.   it to design letterforms as well.
  183.   
  184.   The package consists of a single C source code file, modified mfpic
  185.   macros, documentation, and sample fig files.  It is available at the
  186.   shsu archives.
  187.   
  188. Subject: 10.5. GNU Font Utilities
  189.   
  190.   Here is a brief description of the programs included:
  191.   
  192.      * imageto extracts a bitmap font from an image in PBM or IMG format,
  193.        or   converts the image to Encapsulated PostScript.
  194.   
  195.      * xbfe is a hand-editor for bitmap fonts which runs under X11.
  196.   
  197.      * charspace adds side bearings to a bitmap font.
  198.   
  199.      * limn fits outlines to bitmap characters.
  200.   
  201.      * bzrto converts a generic outline font to Metafont or PostScript.
  202.   
  203.      * gsrenderfont renders a PostScript outline font at a particular
  204.        point   size and resolution, yielding a bitmap font.
  205.   
  206.      * fontconvert can rearrange or delete characters in a bitmap font,
  207.        filter them, split them into pieces, combine them, etc., etc.
  208.   
  209.      * imgrotate rotates or flips an IMG file.
  210.   
  211.   We need volunteers to help create fonts for the GNU project.  You do not
  212.   need to be an expert type designer to help, but you do need to know
  213.   enough about TeX and/or PostScript to be able to install and test new
  214.   fonts.  Example: if you know neither (1) the purpose of TeX utility
  215.   program `gftopk' nor (2) what the PostScript `scalefont' command does,
  216.   you probably need more experience before you can help.
  217.   
  218.   If you can volunteer, the first step is to compile the font utilities.
  219.   After that, contact me [ed: Karl Berry] (karl@gnu.ai.mit.edu).  I will
  220.   get you a scanned type specimen image.  The manual explains how to use
  221.   these utilities to turn that into a font you can use in TeX or
  222.   PostScript.
  223.   
  224.   You can get the source by ftp from any GNU archive site.
  225.   
  226.   You can also order tapes with GNU software from the Free Software
  227.   Foundation (thereby supporting the GNU project); send mail to
  228.   gnu@prep.ai.mit.edu for the latest prices and ordering information, or
  229.   retrieve the file DISTRIB from a GNU archive.
  230.   
  231. Subject: 10.6. Font Editors
  232.   
  233.      * Editors for BDF fonts
  234.   
  235.        There is a bdf font editor that comes with HP/Apollo workstations.
  236.        It's called 'edfont'.  It's not the best but it works.
  237.   
  238.        Gary reports:
  239.   
  240.        The standard X distribution for X11R5 contains "xfed", which
  241.        allows you to play with BDF fonts.  "xfedor" has a more elaborate
  242.        user interface, and is available on most contrib directories.
  243.   
  244.        The last time I tried:
  245.   
  246.        "xfedor" couldn't handle BDF files with more than 256 characters.
  247.   
  248.        "xfed" aborts if the BDF file contains a COMMENT line with no other
  249.        text.  The workaround is to edit the BDF file, to put text after
  250.        the word COMMENT.  A single blank space is sufficient.  For some
  251.        reason, the standard BDF files included in the X release contain
  252.        blank spaces on the otherwise empty COMMENT lines.  It was
  253.        probably easier to add the space to the COMMENT lines of every BDF
  254.        file than it was to fix the lex code for xfed.  :-)
  255.   
  256.      * Editors for PK fonts
  257.   
  258.        The GNU font utilities include an X-based editor called Xbfe which
  259.        edits bitmapped fonts under X.
  260.   
  261.        Eberhard Mattes' emTeX includes PKedit.
  262.   
  263. Subject: 10.7. The T1 Utilities
  264.   
  265.   This is a snippet from the README file for I. Lee Hetherington's
  266.   t1utils package:
  267.   
  268.   t1utils is a collection of simple type-1 font manipulation programs.
  269.   Together, they allow you to convert between PFA (ASCII) and PFB
  270.   (binary) formats, disassemble PFA or PFB files into human-readable
  271.   form, reassemble them into PFA or PFB format.  Additionally you can
  272.   extract font resources from a Macintosh font file (ATM/Laserwriter).
  273.   
  274. Subject: 10.8. Where to get bitmap versions of the fonts
  275.   
  276.   There are archives containing the bitmaps of many of these fonts at
  277.   various sizes and resolutions.  The fonts must have been generated for
  278.   the correct print engine: e.g. write-white or write-black.  The
  279.   archives generally hold only the sizes used by TeX.  These are
  280.   `magstep' sizes, and are not exact point sizes.  It is probably better
  281.   to generate them from the Metafont sources yourself if you can.
  282.   
  283.   The best place to look for raster fonts was almost certainly:
  284.   mims-iris.waterloo.edu
  285.   
  286.   but it isn't any more, the fonts have all gone.  Let me know if you
  287.   find them elsewhere.  Most people seem to have moved to using
  288.   PostScript fonts or Bitstream ones instead now.
  289.   
  290.   Some other sites are:
  291.   
  292.          ctrsci.math.utah.edu (128.110.198.1)
  293.          science.utah.edu (128.110.192.2)
  294.          ymir.claremont.edu (134.173.4.23)
  295.   
  296.   The occasional posting of ftp sites to comp.misc and comp.archives
  297.   lists these and several other sites.
  298.   
  299. Subject: 10.9. Converting between font formats
  300.   
  301.   Conversions to and from pbm and pk format were posted to comp.text.tex
  302.   and to alt.sources on the 9th of August, 1990 by Angus Duggan.  The
  303.   program is pbmtopk, and there are also at least two patches.
  304.   
  305.   Chris Lewis' psroff package includes a program to go from pk both to
  306.   the HP LaserJet and to PostScript.
  307.   
  308.   John McClain <ophelp@tamvenus.bitnet> has some conversion programs for
  309.   various graphics formats to/and from pk files.
  310.   
  311.   A PC program, CAPTURE, turns HPGL files into PK format, US$130 from
  312.   Micro Programs Inc., 251 Jackson Ave., Syosset, NY 11791 U.S.A.
  313.   
  314.   Metaplot can take pen-plotter files and prouce metafont files.  Note:
  315.   Pat Wilcox is no longer at Ohio State.
  316.   
  317.   Kinch Computer Company sell .pk fonts derived from PostScript fonts.
  318.   Kinch Computer Co., 501 S. Meadow St.Ithaca, NY 14850 U.S.A.
  319.   telephone: +1 607 273 0222; fax: +1 607 273 0484
  320.   
  321. Subject: 10.10. Getting fonts by FTP and Mail
  322.   
  323.   If you are using ftp, you will need either the name of the host or the
  324.   Internet number.  For example, to connect to ymir, listed as ftp:
  325.   ymir.claremont.edu [134.173.4.23] you will need to type something like
  326.   
  327.                           ftp ymir.claremont.edu
  328.   
  329.   If that doesn't work, try using the number:
  330.   
  331.                              ftp 134.173.4.23
  332.   
  333.   If that doesn't work, on Unix systems you can use nslookup (it's
  334.   usually /usr/etc/nslookup) to find the host number - it might have
  335.   changed.  Type the entire host name, and after a few seconds nslookup
  336.   will give you the address.  Of course, if you have nslookup installed,
  337.   the first form will probably work...
  338.   
  339.   Once you have connected, you will need to go to the appropriate
  340.   directory, lists its contents, and retrieve the files.
  341.   
  342.   Most of the machines listed here run Unix, and you use "ls" and "cd" to
  343.   list files and to change directories.  Ymir runs VMS, and you will have
  344.   to put square brackets around directory names, like [this].
  345.   
  346.   Remember that although Metafont sources are text files, pk fonts are
  347.   not ASCII, and you will have to use binary mode for them.  In general,
  348.   use text mode for README files and *.mf files, and binary mode for
  349.   other font files.  Files ending in .Z are compressed binary files - you
  350.   will need to use binary mode, and then uncompress the files when you
  351.   get them.
  352.   
  353.   You can get files from ymir by sending mail messages to
  354.   
  355.                         mailserv@ymir.claremont.edu
  356.   
  357.   For example,
  358.   
  359.                        send [tex.mf.misc]cmapl10.mf
  360.   
  361.   will get the file cmapl10.mf from the directory "tex.mf.misc".  You
  362.   can't get binary files in this way.
  363.   
  364.   There is an ftp-by-mail BITNET service, BITFTP, for BITNET users.
  365.   
  366.   Before getting large files by mail, please remember to get permission
  367.   from all intervening sites.  Ask your site administrator, who can send
  368.   mail to Postmaster at each site on the way if necessary.
  369.   
  370. Subject: 10.11. MetaFont to PostScript Conversion
  371.   
  372.   There are (I believe) two programs that perform this task.  At least
  373.   one of them is called "mf2ps".  If you have any more information about
  374.   these tools, please let me know.
  375.   
  376.   Chang Jin-woong reports that he found the "mf2ps" package with Archie.
  377.   It is written by Shimon Yanai <yanai@israearn.bitnet> and Daniel M.
  378.   Berry <dberry@cs.technion.ac.il>. The source programs are written in
  379.   Pascal.
  380.   
  381. Subject: 10.12. 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: 10.13. 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: 10.14. 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: 10.15. PKtoSFP / SFPtoPK
  446.   
  447.   Convert fonts from TeX PK format to HP LaserJet softfont (bitmap)
  448.   format.
  449.   
  450. Subject: 10.16. 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: 10.17. 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.   This is Info file comp.fonts.faq.info, produced by Makeinfo-1.55 from
  544.   the input file FAQ.texinfo.
  545.   
  546.