                       EthiopiX-Windows Fonts 

                      The Tools  of  the Trade

                     A Guide for Getting Started

                           Update  5.7.94



     The purpose of this document is to assist those who would contribute
to bringing Ethiopic fonts to the X-Windows environment.  The intention of
the document is that it be updated by users as users find the archive
information changes and when better tools and procedures are found. 


Section 1 : X11 Font Formats 

  This exert comes directly out of the comp.fonts_FAQ:_X11_Info which
  can be found, along with others at rtfm.mit.edu in /pub/usenet/comp.fonts
  Not noted in the exert is that X11 does accept fonts with addresses
  beyond the 256 limit.  Also not mentioned is that the BDF bitmap encoding
  is hexadecimal.

  In brief, if you would like to skip over this section, what you will
  need to know is that the BDF font format is your "edtting" format for
  a font.  PCF (which sucseeds SNF) is the architecture independent format
  X11R5 uses that you will convert your bdf font to when ready. 

-------
Subject: 9.2. Historical Notes about X11
  
  The X Window System has been in widespread use through releases 3, 4,
  and now 5 of X Version 11.
  
  Fonts weren't really treated by the X Consortium very well until X11
  release 5 (X11R5).  In X11R3 and X11R4, the default format used by the X
  servers was called SNF (server normal format). Basically the font was
  formatted on disk in such a way that the X server could quickly read and
  use it (it was basically a memory-dump).  The important element of the
  SNF format is that it was not a portable format: it depended on the
  architecture of the machine running the server (little endian vs. big
  endian, for example) and as a consequence you needed different directory
  structures for different systems on your network.  On top of that,
  several systems vendors implemented their own font format, making font
  portability even more difficult.
  
  With X11R5, two things changed: the font service protocol was defined as
  a standard and interoperable way for an X server to obtain fonts
  (independent of their format, origin, or current location on disk) and
  the default format for storing fonts was changed from SNF to PCF
  (Portable Compiled Font).  PCF is a format originally developed by DEC.
  Its primary advantage is that it is not architecture dependent.  That
  is, if you compile a font to PCF format on different systems, then you
  may end up having two different PCF files, but each system will be able
  to read the other's file correctly.
  
Subject: 9.3. X11 Font Formats

  
     * BDF
  
       The Bitmap Distribution Format (BDF) is the standard format for
       distribution of fonts. It is an ASCII format so it can easily be
       edited it with your favourite editor or E-mailed to other users.
       As the name suggests, it stores bitmap fonts only.
  
       Another virtue of the BDF format is that most font format
       converters convert to or from this format. Means if you want to go
       from format A to format B, neither of which is BDF, then you are
       likely to convert A to BDF, then BDF to B.
  
       The BDF format is defined by Adobe.  A document describing the
       format is available by ftp from Adobe's file server at
       "ps-file-server@adobe.com".  It is also available in the standard X
       distribution.  Look under ../X11R4(5)/mit/hardcopy/BDF.  This
       document is also reproduced in any text describing the X standard.
  
     * SNF
  
       The Server Normal Format (SNF) is an older format for bitmap
       fonts. The format is X Server and host dependent.  This means that
       if you have two SNF files, their actual format may be different.
       Also, if you have an "snftobdf" utility, it may not be able to
       read font files from other systems.  Convert to BDF format before
       you move it off the host system.
  
       Snftobdf is one utility that can generate a BDF file from a SNF
       file.  It was part of the X11R4 contrib release.  To compile under
       X11R5, you need some of the X11R4 snf include files.
  
     * PCF
  
       The Portable Compiled Font (PCF) format is a binary format for
       bitmap fonts.  The binary contains sufficient information to be
       readable by other systems.
  
---------------------------------------------------------------------------

Section 2:  Where to Get Ethiopic Fonts

  The only Ethiopic fonts presently available by ftp are Abass Alamnehe's
  TeX meta and pk format fonts that come with the EthTeX package.  These
  fonts are the recommended starting place for conversion into any other
  format. See Section 5 for ftp site info.

  100 dpi terminal size bdf and pcf fonts (derived from the pk fonts just
  mentioned) are available through to developers through email request sent
  to Daniel Yacob at yacob@apollo.aoe.vt.edu.  These fonts will be available
  for ftp at a latter time.


---------------------------------------------------------------------------
Section 3:  Overview of Utilities Available


  The file comp.fonts_FAQ:_Utilities(3_3) at rtfm.mit.edu in 
  /pub/usenet/comp.fonts describes a variety of font editors and utilities
  available.  The following will provide a comparative look at the different
  editors available.  See Section 5 for a list of sites where the software
  is available -please keep this list current!!

FONT EDITORS

 BDF Editors

  fideledit -should be the most suitable for editing fidel fonts when
             converted for bdf format.  It has the strong advantage of
             allowing the user to avoid extensive scrolling to edit a
             character.  Also has "copy and paste" and pixel "shuffling"
             features that cut down on work.

  xbfe  -haven't tried it yet, supposed to be the best since it allows you
         edit the font metrics. xbfe is a product of the GNU project and
         requires that you have GNU C and GNUMake on your system.

  xfe   -features presently unknown, under investigation.

  xfed  -simple and convenient, can handle any number of characters in a
         bdf file.  A bug crashes xfed if no text appears after a "COMMENT"
         line -adding a " " is the work around.  A disadvantage of xfed
         is the scrolling required when working on a full fidel font file.
         Imagine here the wear on your finger when clicking your mouse
         button 300 or more times to go back and forth.  It is suggested
         that you break the complete bdf file in to parts to work on.  No
         copy and paste features are offered, you will have to change
         juggle address positions with a text editor.

  xfedor -features a more elaborate interface and menu of editing options.
          The first author had difficulty compiling, but obtained a binary
          file for SunOs 4.1.0 .  Xfedor does not permit the editing of
          font files greater than 256 characters. Scrolling is still
          required but "copy and paste" type editing is offered.  A problem
          was also found with saving a font to a new file name.


 PK Editors 
   
  The GNU xbfe *may* be able to edit pk font files.  Eberhard Mattes' emTeX
  includes PKedit.  Neither of the two has been used as of this writing.


 MetaFont Editors (taken from comp.fonts_FAQ:_Utilities(1_3))
 
  Metafont is a programming language for describing fonts.  It was
  written by Donald Knuth and is documented in
 
         Computers & Typesetting/C: The METAFONTbook
         Knuth, Donald E.
         Addison Wesley, 1986
         ISBN 0-201-13445-4, or 0-201-13444-6 (soft cover)
         Library access: Z250.8.M46K58, or 686.2'24, or 85-28675.
 
  A font written in MetaFont is actually a computer program which, when
  run, will generate a bitmap (`raster') for a given typeface at a given
  size, for some particular device.
 
  * Note: the Metafont editor comes with the EthTeX package

Other Utilities

  The "SeeTeX" package includes "dpi" which can give you an estimate for your
  monitor's dpi manufacture (usually 75 or 100 dpi). Mftobdf also comes with
  SeeTeX and allows you to convert metafonts into bdf files and set scaling
  parameters for the conversion.  The utility requires that you have the file
  "fontdesc" in your TeX library directory.

  The tool "bdfresize" by Hiroto Kagotani's provides an alternative when the
  metafont is not available.  The output file will have to be cleaned up with
  an editor afterwards.

  pk2bdf is highly valuable for converting the Ethiopic pk fonts into the
  editable bdf form.  The program contains one bug which will appear on line
  5 of your output file:  Example "SIZE 12.00 300 300"  the first number
  "12.00" will have to be rewritten as an integer so that you have 
  "SIZE 12 300 300".  This allows you to proceed with editing and other
  conversions.

  getbdf will convert anything your X server understands into the bdf format.
  Hence snftobdf, pcftobdf are not necessary.  It is useful to convert a Latin
  font that you work with into bdf so that you may compare and ........

  xfd, which comes with X11R5, allows you to examine any font on your X
  server in a 16x16 matrix in the size they characters would appear in your
  terminal. It provides the 16bit(?) addresses as well.


  Other GNU utilities described in comp.fonts_FAQ:_Utilities(1_3)

 Here is a brief description of the programs included [in the fontutils tar]:
 
     * imageto extracts a bitmap font from an image in PBM or IMG format,
       or   converts the image to Encapsulated PostScript.
  
     * xbfe is a hand-editor for bitmap fonts which runs under X11.
  
     * charspace adds side bearings to a bitmap font.
  
     * limn fits outlines to bitmap characters.
  
     * bzrto converts a generic outline font to Metafont or PostScript.
  
     * gsrenderfont renders a PostScript outline font at a particular
       point size and resolution, yielding a bitmap font.
  
     * fontconvert can rearrange or delete characters in a bitmap font,
       filter them, split them into pieces, combine them, etc., etc.
  
     * imgrotate rotates or flips an IMG file.
  

Section 3.1 :  Simple Procedures

Ideal Approach :

    1)  Starting with the Ethiopic Metafont files, use Metafont to
        create pk files at a desired point size and device dpi.

    2)  Convert pk files to bdf with "pk2bdf".

    3)  Compile the bdf file into pcf (or snf) with bdftopcf (bdftosnf).
        (alternately bdftops for Post Script fonts).

    4)  Install into your font directory and use immediately!


Less Ideal When Metafont is Not Available:

    1)  Starting with the Ethiopic pk files, use pk2bdf to produce
        usable bdf font files.

    2)  Scale the bdf font with bdfresize to give a reasonable screen
        font (usually 75 or 100 dpi).

    3)  Touch up fonts with xbfe.

    4)  Install into your font directory and use immediately!


Section 3.2 : X Font Installation


  Once you have a bdf file you are happy with you may then compile it into
  a binary file with "bdftopcf -ofilename filename.bdf" or
  "bdftosnf file.bdf > file.snf".  bdftopcf and bdftosnf should already be on
  your system.

  After compilation you must move the file into a directory in the X servers
  font path.  Once there you then need to edit the "font.dir" file which
  contains the names of the fonts and an alias or "nickname".  How to add the
  name of your font will be obvious from the example of other fonts already in
  the file.  Finally you must reboot the machine to get the X server to
  recognize that a new font has been added.

  An alternative (more elegant?) approach comes from the comp.windows.x FAQ :

  "After you have built the font using your system's font-compiler, installed
  it in some directory, and run `mkfontdir` or your system's equivalent in that
  directory, be sure to use `xset +fp $dir` to add that full path-name to the
  server's font-path, *or* if the directory is already in the path, use 
  `xset fp rehash` so that the new fonts in that directory are actually found;
  it is this last step that you're probably leaving out. (You can also use
  `xset q` to make sure that that directory is in the path.)"

  If you do not have root access to your system you will have to make an
  arrangement with you system administrator to install your new fonts.  A
  suggestion to minimize the amount of bugging you give to your sysadm is
  to ask him/her to link fontname (the compiled .pcf or .snf name ) that you 
  are working on into the X11 font directory.  In this way when you have made
  a change to your font file you may use it immediately WITHOUT going through
  the installation process again.


--------------------------------------
Section 4 :  Additional Info

  An essential document to read for understanding the bdf formatting is the 
  Adobe "Glyph Bitmap Distribution Format (BDF) Specification Version 2.2"
  This document is a postscript file and is available through ftp and ftp
  email from the adobe file server (ps-file-server@adobe.com). 

  If you are unable to obtain the X11 Consortium document mentioned in Section
  1, a copy is available under the name "BDF.DOC" at the address given in 
  Section 5.  The document "X11-Font-information" that comes in the "SeeTeX"
  tar file is also useful.

Section 4.1 :  How are The -xxx-xxx-xxx-etc- Names Read?

 This Section NEEDS WORK!!

  The -xxx-xxx-xxx-etc- name that you will find many fonts have if you look
  in your system font directories (typically /usr/lib/X11/fonts) or by entering
  "xlsfonts" at the command line, is called the "XLFD" font name -the X Logical
  Font Description Convention.  Most of the -xxx- strings are optional, you may
  even use spaces.  The X Consortium would like you to register font names with
  them to avoid possible conflicts at a later time.

  By way of example :

  -Adobe-Helvetica-Bold-R-Normal--24-240-75-75-P-65-ISO8859-1

  -foundary-family-weight name-slant-setwidth name-add style name-pixel size
  cont.   -point size-resolution x-resolution y-spacing-character registry
  cont.   -character encoding-

  For Ethiopic fonts the "character encoding" string should be "fontspecific"
  for the time being.


--------------------------------------
Section 5 :  Resource Archives


Fonts        :  ftp location  : Directory/(filename)
-----

metafonts    :  ftp.shsu.edu  : tex-archive/languages/ethiopia/ethtex/
                                disk7/(ethiofnt.zip)

pk fonts     :  ftp.shsu.edu  : tex-archive/languages/ethiopia/ethtex/[printer]

bdf          :  ftp.rpi.edu   : /pub/languages/ethiopia/... future

pcf          :  ftp.rpi.edu   : /pub/languages/ethiopia/... future


Tools        :  ftp location : Directory/(filename)
-----

bdfresize    :  ftp.cs.titech.ac.jp : /X11/contrib/(bdfresize-1.4.tar.Z)

bdftomf      :  ????

bdftools     :  ftp.x.org :  /R5contrib/(bdftools.tar.Z)

bdftopk      :  ????

bdftopcf     :  ( comes with X11R5 should be installed on your system )

bdftosnf     :  ( comes with X11R5 should be installed on your system )

bdftops      :  see "bdftools"  (another version comes with X11R5)

bintobdf     :  see "bdftools"

dpi          :  ftp.x.org :  /R5contrib/(SeeTeX-2.18.5.tar.Z)

fideledit    :  ftp.rpi.edu : /pub/languages/ethiopia/email/(eview.tar.Z)

fontutils    :  prep.ai.mit.edu : /pub/gnu/(fontutils-0.6.tar.gz) 

getbdf       :  collatz.mcrcim.mcgill.edu

mac2bdf      :  metis.com : /pub/(mac2bdf.c)

mftobdf      :  see "dpi"

pk2bdf       :  ftp.inria.fr  /X/contrib-R5/fonttools/(pk2bdf.shar.Z)

ps2mf        :  2 exist, site unknown, contact norm@ora.com
                                           or  yanai@israearn.bitnet
                                           or  dberry@cs.technion.ac.il

ps2pk        :  ftp.urc.tue.nl : /pub/tex/(ps2pk14.tar.gz)

snftobdf     :  see "bdftools"

xbfe         :  see "fontutils"

xfd          :  ( comes with X11R5 should be installed on your system ) 

xfed         :  ftp.inria.fr : /X/contrib-R5/fonttools/(xfed.tar.Z) 

xfedor       :  ftp.x.org :  /R5contrib/(xfedor.tar.Z)
                ftp.inria.fr : /X/contrib-R5/fonttools/(xfedor.tar.Z)
                SunOs 4.x binaries : avahi.inria.fr : 
                                    /pub/(xfedor-sun-binaries.tar.gz)


Documents     :   ftp location : Directory/(filename)
---------

BDF Specs     :   ftp.adobe.com : /pub/adobe/DeveloperSupport/
                                   TechNotes/(5005.BDF_Spec.ps)

BDF.DOC       :   collatz.mcrcim.mcgill.edu  :  /X/(BDF.DOC)

Unicode       :   metis.com    :  /pub/Unicode1.1/(*several*)

X11-Font-Information 
              :   ftp.x.org    :  /R5contrib/(SeeTeX-2.18.5.tar.Z)

FAQs          :   rtfm.mit.edu :  /pub/usenet/comp.fonts
                                  /pub/usenet/comp.windows.x
xlfd.PS       :   ftp.x.org    :  /pub/R6untarred/xc/doc/hardcopy/XLFD/
                                   (xlfd.PS.Z)
