home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / FONTL12A / EMTEX / DOC / ENGLISH / FONTLIB.DOC
Text File  |  1994-04-09  |  15KB  |  367 lines

  1. ==============================================================================
  2. FONTLIB 1.2a                                              VERSION: 07-Apr-1994
  3. ==============================================================================
  4.  
  5.  
  6. Table of Contents
  7. =================
  8.  
  9. 1    Introduction
  10. 2    Calling sequence
  11. 2.1    Options
  12. 2.2    Operations
  13. 3    Examples
  14. 4    History
  15.  
  16.  
  17. 1 Introduction
  18. ==============
  19.  
  20. fontlib allows PK and PXL font files to be gathered into a font li-
  21. brary file.
  22.  
  23.  
  24. 2 Calling sequence
  25. ==================
  26.  
  27. fontlib is called as follows:
  28.  
  29.     fontlib {option} library-file [output-file] {operation}
  30.  
  31. This manual uses the following syntactic conventions:
  32.  
  33. {a}     means `a' may appear 1 or more times or not at all
  34.  
  35. [a]     means `a' may appear once or not at all
  36.  
  37. The default extension for the font library file and the output file
  38. is FLI.  When modifying large font libraries, it is recommended that
  39. the output file is located on another drive as the whole input file
  40. will be copied, being given the extension BAK.  If the library is not
  41. modified, it will not be copied.
  42.  
  43.  
  44. 2.1 Options
  45. -----------
  46.  
  47. Options can start with `/' or `-'.
  48.  
  49. /1      Use old FLI file format.  This should not be used, as the
  50.         members of the dvidrv family 1.4d or later can only read the
  51.         new format.  Since the drivers of version 1.4c or earlier can-
  52.         not read the new format, this option is required for making
  53.         new FLI files usable with the old drivers.
  54.  
  55. /2      Use new FLI file format.  If /2 is specified, the output file
  56.         will be written using the new FLI format, even if the input
  57.         file is of the old format.  If neither /1 nor /2 is specified,
  58.         the output file will be written in the same format as the
  59.         input file.  If a new file is created (and /1 isn't given),
  60.         the new format will be used.
  61.  
  62. /b#     Set base resolution (device resolution).  This option must
  63.         be used when converting an old FLI file to the new format or
  64.         when merging an old FLI file with `&library' or when reading
  65.         fonts from an old FLI file with the `library name' operation.
  66.         The resolution set with /b# enables fontlib to compute the
  67.         exact font size (in DPI) from the old PXL font size.  If
  68.         /b# is omitted, the font sizes in the new library will have
  69.         considerable rounding errors.  /b# also enables usage of :0
  70.         to :9 and :h (without resolution) for specifying font sizes.
  71.         Note: don't use the resolution (size) of the fonts with /b#
  72.         instead of the device resolution (`magstep 0').
  73.  
  74. /c      A new font library will be created (no output file allowed).
  75.         If a file of the same name already exists, the user will be
  76.         asked if it should be overwritten -- if the option /w is used,
  77.         any existing file will be overwritten without being queried.
  78.         If /c is not given, the library does not exist and no output
  79.         file name is given, then the user will be asked if a new file
  80.         is to be created.
  81.  
  82. /d      Missing directories will be created while copying fonts from
  83.         the library (`#name' operation).
  84.  
  85. /f*     Font list.  /f* specifies the name of a file containing a
  86.         list of font names.  Every line of this file contains a font
  87.         name, optionally followed by the number of characters in that
  88.         font.  The main purpose of this file is to provide long font
  89.         names (more than 8 characters).  The `+*.pk' operation yields
  90.         font names truncated to 8 characters, as DOS supports only
  91.         file names of up to 8 characters (without extension).  fontlib
  92.         uses the long font name from the font list if the (truncated)
  93.         font name contains exactly 8 characters and matches the first
  94.         8 characters of a long file name in the font list.  The
  95.         line lcirclew10 70 causes the file name `lcirclew.pk' to be
  96.         converted to the font name `lcirclew10'.  The old FLI format
  97.         supports only 8 characters per font name.  The number of
  98.         characters in a font (70 in the above example) is used for
  99.         checking the FLI file (/t option).  If the number of character
  100.         in a font doesn't match the number given in the font list, a
  101.         fatal error message will be displayed and fontlib will abort.
  102.         The file \emtex\data\fontlist contains a list of all the fonts
  103.         that come with emTeX.  fontlib searches the current working
  104.         directory and the `data' subdirectory of the emTeX directory
  105.         unless the filename contains a path.  The emTeX directory is
  106.         specified by the environment variable EMTEXDIR.  If EMTEXDIR
  107.         is not set, the emTeX directory defaults to \emtex, that is,
  108.         \emtex\data will be searched for the font list file.
  109.  
  110. /i      After the command line has been interpreted, the user is
  111.         prompted for the operations required.  More than one operation
  112.         can be entered on a line: input is ended when an empty line is
  113.         entered.  In this interactive mode the entry of `?' will cause
  114.         the selected directory and the selected font size to be dis-
  115.         played.
  116.  
  117. /k      Fonts already in the library will not be replaced.  If neither
  118.         /k nor /r is given, fontlib will ask if an existing font is to
  119.         be replaced.
  120.  
  121. /l      List the contents of the library; if the library is changed
  122.         by this call to fontlib, the contents of the new library will
  123.         be listed.  For each font, the font name, the position in the
  124.         file, and the length will be displayed.
  125.  
  126. /r      Fonts already in the library will be replaced without query.
  127.         If neither /k nor /r is given, fontlib will ask if an existing
  128.         font is to be replaced.
  129.  
  130. /t      If /t is given, every file to be entered in the library will
  131.         be checked to make sure it is a valid font file.  If /t is not
  132.         given, any file can be put in the library.  If the library is
  133.         not modified, then this option causes the files already in the
  134.         library to be checked.  Using /t causes the program to run
  135.         much more slowly.  When checking, only font files with an ID
  136.         of 89 (PK), 1001 and 1002 (PXL) will be accepted.  See also
  137.         /f*.
  138.  
  139.         Extra data after the end of the data proper is considered an
  140.         error.  This is a problem when transferring font files from
  141.         certain machines.
  142.  
  143. /v      Messages showing the progress of the library processing will
  144.         be displayed.  This option should always be used.
  145.  
  146. /w      Existing files (library files and font files when copied from
  147.         the library) will be overwritten without query.
  148.  
  149. /x*     Change the library comment; the comment must immediately
  150.         follow /x without a space.  If the comment contains spaces,
  151.         then the comment must be enclosed in quotes:
  152.  
  153.             /x"this is a comment"
  154.  
  155. If both /r and /k are given as options then only the last one will be
  156. observed.
  157.  
  158.  
  159. 2.2 Operations
  160. --------------
  161.  
  162. The actions to be taken by fontlib are specified by operations.
  163.  
  164. font size
  165.  
  166.     Sets the font size for the operation which follow.  fontlib
  167.     supports -- like dvidrv -- the following specifications of font
  168.     size:
  169.  
  170.     328.63353
  171.             font size (DPI)
  172.  
  173.     300:h   300 DPI * 1.2 ^ 0.5 (=328.63353)
  174.  
  175.     :2      magnification step 2 (requires /b#)
  176.  
  177. [=]directory
  178.  
  179.     The directory entered is taken to be the default directory for the
  180.     operations which follow.  To avoid confusion, you should precede
  181.     the directory with an equal sign.  The directory name may contain
  182.     %s and %r (font size (in DPI) and PXL font size, respectively).
  183.  
  184. library name
  185.  
  186.     Entering a font library name is taken to mean that any font files
  187.     used in the operations which follow are to be taken from this li-
  188.     brary.  The path name must not contain percent signs.  If a direc-
  189.     tory name is entered, font files are assumed to be single files
  190.     again.
  191.  
  192. +name
  193.  
  194.     This font file is to be copied into the library -- before this can
  195.     be done, the font size must be set (see above).  The name can be
  196.     a path name in which case the file will be taken from the direc-
  197.     tory given; if the name alone is used, it will be prefixed with
  198.     the default directory.  If no extension is given, first the file
  199.     will be sought under the name alone; if not found, it will then be
  200.     sought with the extension PK and then, if it is still not found,
  201.     with the extension PXL.  The first file found will then be copied
  202.     into the library.  The font name is derived from the file name by
  203.     omitting drive, directory, and extension.  Capital letters will be
  204.     converted into lowercase.  See /f*.  If the name is to be selected
  205.     from a library then it may not be entered with a drive, directory
  206.     or extension.  If the font is in the library and the /r option is
  207.     not in force, the user will be asked if it is to be replaced.  If
  208.     the option /r has been given, however, the font will be replaced
  209.     without query.
  210.  
  211.     If the font file isn't found, fontlib will apply the 5+3.3
  212.     truncation rule, then the 8.3 truncation rule to the filename.
  213.  
  214. -name
  215.  
  216.     The font with this name and the selected size will be deleted from
  217.     the library.  The name may not be entered with either a directory
  218.     or an extension.
  219.  
  220. &library
  221.  
  222.     All the fonts in this library will be copied into the library
  223.     under construction.  If the option /r has been chosen, fonts will
  224.     be replaced without query.  The default extension used is FLI
  225.     and the current directory set by the `=directory' operation (see
  226.     above) will be ignored.  If this library is an old one, you should
  227.     use /b# and /f*.
  228.  
  229. #name
  230.  
  231.     Fonts will be copied from the library to individual files.  The
  232.     name can be a path name and can have an extension which will be
  233.     used to place the copy.  If no directory is given, the selected di-
  234.     rectory will be used.  If no extension is given, the extension of
  235.     the file is derived from the type of the font: PK for PK fonts,
  236.     PXL for PXL fonts, and no extension otherwise.  If the /w option
  237.     has been selected, existing files will be overwritten without
  238.     query.  If /d is used, missing directories will be created.
  239.  
  240.     Under DOS, the filename will be truncated according to the 5+3.3
  241.     rule.  Under OS/2, this is done only when necessary.  When
  242.     extracting individual files, you can control the truncation by
  243.     entering an appropriately truncated font name; however, this works
  244.     only if a font list file is used.  For instance, you can extract
  245.     `lcirclew10' into `lcirclew.pk' or `lcircw10.pk'.
  246.  
  247.     It is not possible to request 8.3 truncation when using
  248.     wild-cards.
  249.  
  250. @file
  251.  
  252.     Read a response file, the library operations within will be
  253.     processed.  A response file may contain calls to further response
  254.     files.
  255.  
  256. All font names may contain the wild-card characters `?' and `*' which
  257. will be treated in the same way as PC-DOS and MS-DOS do.  Note: if
  258. wild-card characters are used with the +name operation an extension
  259. must be given: `+*', for example, will find only files without an ex-
  260. tension -- the correct form is `+*.pk' or `+*.pxl'.  Caution: font
  261. file names are case sensitive -- they should normally be entered in
  262. lowercase.  If you are using `?' or `+', you should give the /f* op-
  263. tion.
  264.  
  265. If you specify an invalid operation, the program automatically goes
  266. into interactive mode so that corrections can be made.
  267.  
  268. If no output file is given in the command line then the first
  269. operation must not be a directory without preceding `=' as this would
  270. be taken as the output file name: in this case the font size (or a di-
  271. rectory preceded by `=') should be specified first.
  272.  
  273.  
  274. 3 Examples
  275. ==========
  276.  
  277. Create a new library (without prompting) and copy a number of fonts
  278. into it.  Use device resolution 300 DPI (to enable :0 and :1) and the
  279. font list \emtex\data\fontlist for creating long font names:
  280.  
  281.     fontlib /c /b300 /ffontlist hplaser =pxl%s :0 +*.pk :1 +*.pk
  282.  
  283. Combine three libraries (bib1, bib2, bib3) into one (output file
  284. newlib) and remove the library comment:
  285.  
  286.     fontlib /x bib1 newlib &bib2 &bib3
  287.  
  288. Convert an old FLI file to the new format, device resolution is 240
  289. DPI:
  290.  
  291.     fontlib /2 /b240 /ffontlist fx_1440 fx_1
  292.  
  293. Convert a new FLI file to the old format:
  294.  
  295.     fontlib /1 fx_1 fx_1440
  296.  
  297. Copy a few fonts out of a library to PK files, displaying the actions
  298. as they take place:
  299.  
  300.     fontlib /w /v /b300 /d myfonts =c:\pixel\%rdpi :0 #cm*.pk :1 #lasy10.pk
  301.  
  302. Check and list the contents of a library (the number of characters in
  303. each font listed with a number in \emtex\data\fontlist will be checked
  304. too):
  305.  
  306.     fontlib /l/t/ffontlist hplaser
  307.  
  308. Carry out large scale modifications with interactive input, display
  309. all operations, replace fonts without query and include a new comment:
  310.  
  311.     fontlib /i/v/r /x"New comment" c:epsonfx d:epsonfx
  312.  
  313. Create a new library (300 DPI base resolution) using a response file:
  314.  
  315.     fontlib /c/v/ffontlist /b300 newlib =c:\newfonts\%rdpi @all.rsp
  316.  
  317. where all.rsp contains the following line:
  318.  
  319.     :0 +*.pk :1 +*.pk :2 +*.pk :3 +*.pk :4 +*.pk :5 +*.pk :h +*.pk
  320.  
  321.  
  322. 4 History
  323. =========
  324.  
  325. 1.0a    First usable version.
  326.  
  327. 1.0b    Fatal errors and warnings numbered.
  328.         Checking of font files.
  329.         `*' and `?' can be used in operations.
  330.  
  331. 1.0c    Font names shortened to 8 characters.
  332.         Interactive input with /i option.
  333.         Adding library files with: &library.
  334.         File and font overwriting query with: /w, /r.
  335.         Output file can be given.
  336.  
  337. 1.0d    PXL files with ID 1002 are accepted as valid.
  338.  
  339. 1.0e    File buffers increased.
  340.  
  341. 1.0f    @response files.
  342.  
  343. 1.0g    /k option.
  344.         Reading from library files.
  345.  
  346. 1.0h    Now runs under OS/2 (bound version)
  347.  
  348. 1.0i    "Disk full" did not always give an error message.
  349.  
  350. 1.0j    The greatest font size is now 66535 (earlier 32767).
  351.  
  352. 1.1a    New FLI file format.
  353.         New options: /1, /2, /b#, /d, /f*.
  354.         Specifying font sizes using DPI instead of PXL font size.
  355.         %s and %r in directory names.
  356.         Options starting with -.
  357.  
  358. 1.1b    Fix typo in message 2004.
  359.  
  360. 1.1c    Move `fontlist' from \emtex to \emtex\data.
  361.         Use EMTEXDIR to find font list file.
  362.         Support long file names on HPFS under OS/2.
  363.         Truncate names of font files using the 5+3.3 and 8.3 rules.
  364.         Automatically append .pk or .pxl when extracting fonts.
  365.  
  366. 1.2a    Avoid internal error 3012.
  367.