#
# $Id: README,v 1.12 1998/06/26 17:39:28 mleisher Exp $
#

#
# Copyright 1996, 1997, 1998 Computing Research Labs, New Mexico State
# University
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
# OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

This is version 2.2 of a program to convert TrueType fonts to BDF fonts using
the FreeType renderer.

BDF fonts can be edited using the XmBDFEditor which is available from (replace
the <version> with the most current version number):

  [Sources]
  ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed.tar.gz

  [Binaries: Linux/Pentium, Solaris, SunOS]
  ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed-<version>-ELF.tar.gz
  ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed-<version>-SOLARIS.tar.gz
  ftp://crl.nmsu.edu/CLR/multiling/General/xmbdfed-<version>-SUNOS.tar.gz

COMPILING ttf2bdf
-----------------

1. Pick up the latest FreeType distribution from:

ftp://ftp.physiol.med.tu-muenchen.de/pub/freetype/devel/freetype-current.tar.gz

2. Unpack FreeType and build it.

3. Go into the "contrib/ttf2bdf/" directory and type "make" to build "ttf2bdf".

RUNNING ttf2bdf
---------------

Type the following to get a list of command line options:

  % ttf2bdf -h

ACKNOWLEDGEMENTS
----------------

Thanks go to the following people:

  Robert Wilhelm <robert@physiol.med.tu-muenchen.de> for pointing out a
  crucial problem with the pre-1.0 code.

  Lho Li-Da <ollie@ms1.hinet.net> for pointing out a problem with Big5 and
  GB2312 encoding ids being documented incorrectly in the TT docs and a
  problem with glyphs that are height 1 or width 1, and a font name problem.

  Adrian Havill <havill@threeweb.ad.jp> for unintentionally pointing out a
  missing feature.

  Richard Verhoeven <rcb5@win.tue.nl> for pointing out a font names problem,
  problem with bitmaps missing their last byte in each row, and an invalid
  FONT_DESCENT property value.

  Choi Jun Ho <junker@jazz.snu.ac.kr> for his inspiration from his
  implementation that changed some character set names, and added a
  number of new command line parameters.

  Pavel Kankovsky <peak@kerberos.troja.mff.cuni.cz> for providing some
  critical grid fitting and metrics fixes when generating the bitmaps,
  adding the code to "auto-detect" bold and italic fonts, removing the
  dependency on ttobjs.h, finding some remapping bugs, and other fixes.

  Matti Koskinen <mjkoskin@sci.fi> for pointing out a problem with using
  the code 0xffff.

  Eugene Bobin <gene@ftim.ustu.ru> for contributing the Cyrillic mapping
  tables (iso8859.5, koi8.r, windows.1251) and the sample shell scripts for
  generating sets of BDF fonts.

  Oleg N. Yakovlev <yashka@optima.dnepropetrovsk.ua> for alerting me to the
  problem of certain codes not being loaded correctly in the mapping tables.

  Bertrand Petit <elrond@phoe.frmug.org> for providing additional command line
  parameters to allow more control over the XLFD name generated.

  Roman Czyborra <czyborra@cs.tu-berlin.de> for pointing out the need for a
  change from UNICODE-2.0 to ISO10646-1 in the font XLFD name.

CHANGES
-------
Version 2.2
===========
  1. Added missing documentation in the manual page.

  2. Added the `-u' parameter to allow setting the character used to replace
     dashes or spaces in the font name.

  3. Changed the CHARSET_REGISTRY and CHARSET_ENCODING to be "ISO10646-1"
     instead of "Unicode-2.0".

  4. The numGlyphs property comes back incorrect for some fonts, so the loop
     cycles through all 65536 possibilities every time now.

Version 2.1
===========
  1. Added patches provided by Bertrand Petit.

  2. Insured compatibility with FreeType 1.1.

Version 2.0
===========
  1. Created two new subdirectories.  One for mapping tables and one for any
     other contributed code, scripts, or data.

  2. Updated Cyrillic mapping files sent by Eugene Bobin.

  3. Minor fixes to make compatible with the latest version of FreeType.

Version 1.9
===========
  1. Fixed a problem with the first code of a mapping table being lost.

Version 1.8
===========
  1. Added the Unicode->Cyrillic mapping tables provided by Eugene Bobin.

  2. Created a shell script based on Eugene Bobin's scripts to generate sets
     of BDF fonts at one time.

Version 1.7
===========
  1. If a remapping table is provided, code ranges are now expected to be
     specified in terms of the codes in the mapping table.

  2. The glyph generation loop is improved a bit.

Version 1.6
===========
  1. Added two expected keywords REGISTRY and ENCODING in the remap files.
     These values are used when the font's XLFD name is generated.

  2. Added TTF2BDF_VERSION macro used for adding the "Converted by" comment.

  3. Handle the case of no glyphs being generated.  No BDF font is produced.

  4. Updated for new API with TT_Engine.

Version 1.5
===========
  1. Fixed a problem with updating the average width field of the XLFD
     font name.

  2. Changed things so bitmaps are generated to a temporay file so an
     accurate count and metrics can be calculated.

  3. Changed things so the font header is not generated until the bitmaps
     have been generated.  This allows accurate calculations of the various
     fields needed.

  4. Added the '-l' command line parameter that allows specification of a
     subrange of glyphs to generate.  The syntax is the same as that used in
     X11 for subranges.  See the X11 XLFD documentation, page 9 for more
     detail.

     Example:

       % ttf2bdf -l '60 70 80_90' font.ttf -o font.bdf

       The command above will only generate the glyphs for codes 60, 70,
       and 80 through 90 inclusive.

  5. Added the ability to load a mapping table that will remap a font to
     another character set.  The mapping table should have two columns.

     The first column should be the hexadecimal code of the glyph in the
     "cmap" table ttf2bdf is using.  The second column should have the
     code which should be used in the BDF font.  An example mapping file
     is provided which will map fonts from Unicode (default cmap table) to
     ISO8859-2.

  6. Fixed grid fitting to avoid dropout in some cases.

  7. Removed dependency on ttobjs.h by using the new API function for
     retrieving strings.

  8. Removed warning about getpid() on Solaris.

  9. Rearranged the man page a bit to be more useful.  Minor
     improvements also done.

  10. Changed the loop so it does not include 0xffff as a code because
      it causes crashes when converting some fonts.

Version 1.4 [Never released as binaries]
===========
  1. Changed the names of two MS encodings (Wansung and Johab) to
     KSC5601.1987 and KSC5601.1992.

  2. Added the '-n' command line flag to turn hinting off.

  3. Added the '-c' command line flag to set the font spacing.

  4. Added the '-t', '-w', and '-s' command line options to override the
     default typeface, weight and slant names.

Version 1.3
===========
  1. Converted to use the new FreeType API.

  2. Added the '-rh' and '-rv' command line parameters to allow both the
     horizontal and vertical resolutions to be set individually.

  3. Fixed a problem with ignoring undefined glyphs.  All undefined were
     being rendered which caused missing glyphs on the end.

  4. Fixed a problem with offset calculations needed to render glyph
     bitmaps.

Version 1.2
===========
  1. Fixed a problem with dashes that appear in the font family name causing
     parse problems with the XLFD font names.

  2. Fixed a problem with certain bitmaps missing their final byte on each
     row.

  3. Fixed an incorrect FONT_DESCENT value.

  4. Changed things around so names can be retrieved in a more general way.

  5. Fixed a problem with bitmaps not being generated after a certain point.

Version 1.1
===========
  1. Fixed the actual glyph count for the CHARS line.

  2. Swapped the Big5 and GB2312 XLFD encoding strings because of incorrect TT
     specifications.

  3. Fixed a problem with bitmap generation for glyphs that are width 1 or
     height 1.

  4. Added command line parameters to set the font and render pool memory
     sizes in Kilobytes from the command line.

Version 1.0
===========
  1. Initial release.

mleisher@crl.nmsu.edu (Mark Leisher)
15 October 1997
