From: walsh@cs.umass.edu (Norman Walsh)
Newsgroups: comp.fonts
Subject: FAQ: Part III: MS-DOS Info
Date: 4 Sep 92 19:34:08 GMT
Reply-To: walsh@cs.umass.edu
Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)

FAQ for comp.fonts: Part III: MS-DOS-specific Info

Version 0.0.3, Release 04SEP92

Welcome to the comp.fonts FAQ.  This article, posted monthly, describes many
of the basic questions that seem to be repeated frequently on comp.fonts.
Your comments are both welcome and encouraged. 

The FAQ is divided into five parts posted seperately.  The parts are:

   Part   I: General Info
   Part  II: Macintosh-specific Info
   Part III: MS-DOS-specific Info
   Part  IV: *nix-specific Info
   Part   V: Sun-specific Info
   Part  VI: X-specific Info

The decision to divide the FAQ into multiple parts is somewhat arbitrary
although it stems, in part, from the fact that it would be too long to mail in
one piece anyway.  Even if you don't use a particular architecture, you may
find it helpful to read the FAQ for that platform at least once.  Some ideas,
like font format conversion, may be relevant to more than one platform even if
they are expressed in platform-specific tools at this time.

This section is divided into the following topics:

1.  MS-DOS font notes
2.  Font installation
3.  Font utilities
4.  Converting Macintosh Type1 fonts to MS-DOS format

------------------------------------------------------------------------------

1. MS-DOS font notes

  The easiest way to get outline fonts under MS-DOS is with MicroSoft
  Windows 3.x or OS/2 2.x.

  MicroSoft Windows 3.0 with Adobe Type Manager (ATM) and OS/2 2.0 support
  PostScript Type1 fonts.

  MicroSoft Windows 3.1 supports TrueType fonts natively.

  Bitmap fonts are available in a variety of formats: most formats are
  designed with the printer in mind and not the display since (prior to
  graphical environments like Windows, GEM, and OS/2) the majority of work
  under MS-DOS was done with a character-based interface.

1.2. Frequently requested fonts

  Many fonts are available at various archives.  The biggest font archive
  for MS-DOS format fonts is ftp.cica.indiana.edu.  Note: you can use any
  Mac format Type1 font on your PC by converting it to PC format with the
  free/shareware as described below.

  The following fonts are in Type 1 format for MS-DOS. Some are also
  available in TrueType format.

  Hebrew        ShalomScript, ShalomOldStyle, ShalomStick

  Japanese      Shorai

  Start Trek    Crillee, TNG monitors

2. Font Installation

  If you have any information that you feel belongs in this section, it
  would be greatly appreciated.

  Windows and OS/2

    If you feel up to the challenge, please send appropriate instructions
    for this section to norm <walsh@cs.umass.edu>.  Unfortunately, I do not
    have OS/2 or Windows so I cannot accurately describe the steps involved.

  Other Programs

    It is an unfortunate fact that almost all MS-DOS programs do things
    differently.  Your best bet is to read the manual that comes with the
    program you want to use.

3. Font utilities

  PS2PK 

    PS2PK allows you to convert PostScript Type1 fonts into bitmap fonts.
    The bitmap files produced are in TeX PK format.

  PKtoSFP
  
    PKtoSFP allows you to convert TeX PK fonts into HP LaserJet softfonts.

  PFBDir/PFBInfo

    PFBDir and PFBInfo format and display the "headers" in a binary Type1
    font.

4. Converting Macintosh Type1 fonts to MS-DOS format

Converting Macintosh Type1 fonts into PC Type1 fonts can be done using purely
free/shareware tools.  I've outlined the procedure below.  Make sure you read
the "readme" files that accompany many fonts.  Some font authors specifically
deny permission to do cross-platform conversions.

THE TOOLS YOU NEED:
-------------------

   XBIN:   xbin23.zip in /pub/msdos/mac on oak.oakland.edu (or other mirrors)
   UNSIT:  unsit30.zip in /pub/msdos/mac on oak.oakland.edu
   UNCPT:  ext-pc.zip in /pub/pc/win3/util on ftp.cica.indiana.edu
   REFONT: refont11.zip in /pub/pc/win3/fonts on ftp.cica.indiana.edu
   BMAP2AFM: bm2af01.zip in /pub/norm/mac-font-tools on ibis.cs.umass.edu

XBIN converts Mac "BinHex"ed files back into binary format.  BinHex is the
Mac equivalent of UUencoding, it translates files into hexidecimal digits
so that mailers can send them around without difficulty.  It also aids in
cross platform copying too, I'm sure.  BinHexed files generally have filenames
of the form "xxx.yyy.HQX".

UNSIT explodes "Stuffit" archives.  Stuffit archives generally have filenames
of the form "xxx.SIT".

UNCPT exploces "Compactor" archives.  The ext-pc implementation is called
"extract" and does not require windows (even thought it's in the windows
section on cica).  Compactor archives generally have filenames of the form
"xxx.CPT".

REFONT converts Mac type1 fonts into PC type1 fonts.

BMAP2AFM constructs AFM files from the metric information contained in Mac
screen fonts (.bmap files).  The screen font files do not have any standard
name (although they frequently have the extension .bmap).  The screen fonts
have file type "FFIL" which, in combination with some common sense, is usually
sufficient to identify them.

I've listed the tools that I've used and the sites that are reasonable for 
me to retreive them from.  It's probably a good idea to check with archie
for closer sites if you're not in North America.  These tools run under
MS-DOS.  XBIN and UNSIT can also be run under Unix.

HOW TO DO IT:
-------------

Collect the Mac fonts from the archive or BBS of your choice.  Most of these
files will be in BinHexed format.  As a running example, I'm going to use
the imaginary font "Plugh.cpt.hqx".  When I download this font to my PC, I
would use the name "PLUGH.CPX".  The actual name you use is immaterial.

Run XBIN on PLUGH.CPX.  This will produce PLUGH.DAT, PLUGH.INF, and PLUGH.RSR.
The data fork of the Mac file (the .DAT file) is the only one of interest to
us, you can delete the others.

If the original file had been "Plugh.sit.hqx", we would be using the UNSIT
program.  Since I chose a .cpt file for this example, I'm going to run UNCPT.

Run UNCPT on PLUGH.DAT.  You want to extract the AFM file (if present), the
documentation or readme file (if present), and the Type1 outline file.  The
AFM and README files will be in the data fork of the archive file.  The Type1
outline will be in the resource fork.  The AFM and README files have Mac
"TEXT" type.  The Type1 outline file has "LWFN" type.  I'm not trying to
describe this part in a step-by-step fashion.  Use the docs for UNCPT and
UNSIT as a guide.  If you got this far you probably won't have much
difficulty.  If you do, drop me a line and I'll try to help.

If the font does not contain an AFM file, extract the screen font.  Screen
fonts frequently have the extension .bmap and are "FFIL" type files.  Use
Bmap2AFM to construct an AFM from the screen font.  If the archive _does_
contain an AFM file, it's safe to bet that the author's AFM will be better
than the one created by Bmap2AFM.

Finally, run REFONT on the Type1 outline that you extracted above.  The result
should be an appropriate PC type1 outline.  REFONT will create a PFM file for
you from the AFM file, if you desire.

Remember to register your shareware...

--END OF PART III--






Newsgroups: comp.fonts