home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega Top 1
/
os2_top1.zip
/
os2_top1
/
APPS
/
TEKST
/
FONTL12A
/
EMTEX
/
DOC
/
ENGLISH
/
FONTLIB.DOC
Wrap
Text File
|
1994-04-09
|
15KB
|
367 lines
==============================================================================
FONTLIB 1.2a VERSION: 07-Apr-1994
==============================================================================
Table of Contents
=================
1 Introduction
2 Calling sequence
2.1 Options
2.2 Operations
3 Examples
4 History
1 Introduction
==============
fontlib allows PK and PXL font files to be gathered into a font li-
brary file.
2 Calling sequence
==================
fontlib is called as follows:
fontlib {option} library-file [output-file] {operation}
This manual uses the following syntactic conventions:
{a} means `a' may appear 1 or more times or not at all
[a] means `a' may appear once or not at all
The default extension for the font library file and the output file
is FLI. When modifying large font libraries, it is recommended that
the output file is located on another drive as the whole input file
will be copied, being given the extension BAK. If the library is not
modified, it will not be copied.
2.1 Options
-----------
Options can start with `/' or `-'.
/1 Use old FLI file format. This should not be used, as the
members of the dvidrv family 1.4d or later can only read the
new format. Since the drivers of version 1.4c or earlier can-
not read the new format, this option is required for making
new FLI files usable with the old drivers.
/2 Use new FLI file format. If /2 is specified, the output file
will be written using the new FLI format, even if the input
file is of the old format. If neither /1 nor /2 is specified,
the output file will be written in the same format as the
input file. If a new file is created (and /1 isn't given),
the new format will be used.
/b# Set base resolution (device resolution). This option must
be used when converting an old FLI file to the new format or
when merging an old FLI file with `&library' or when reading
fonts from an old FLI file with the `library name' operation.
The resolution set with /b# enables fontlib to compute the
exact font size (in DPI) from the old PXL font size. If
/b# is omitted, the font sizes in the new library will have
considerable rounding errors. /b# also enables usage of :0
to :9 and :h (without resolution) for specifying font sizes.
Note: don't use the resolution (size) of the fonts with /b#
instead of the device resolution (`magstep 0').
/c A new font library will be created (no output file allowed).
If a file of the same name already exists, the user will be
asked if it should be overwritten -- if the option /w is used,
any existing file will be overwritten without being queried.
If /c is not given, the library does not exist and no output
file name is given, then the user will be asked if a new file
is to be created.
/d Missing directories will be created while copying fonts from
the library (`#name' operation).
/f* Font list. /f* specifies the name of a file containing a
list of font names. Every line of this file contains a font
name, optionally followed by the number of characters in that
font. The main purpose of this file is to provide long font
names (more than 8 characters). The `+*.pk' operation yields
font names truncated to 8 characters, as DOS supports only
file names of up to 8 characters (without extension). fontlib
uses the long font name from the font list if the (truncated)
font name contains exactly 8 characters and matches the first
8 characters of a long file name in the font list. The
line lcirclew10 70 causes the file name `lcirclew.pk' to be
converted to the font name `lcirclew10'. The old FLI format
supports only 8 characters per font name. The number of
characters in a font (70 in the above example) is used for
checking the FLI file (/t option). If the number of character
in a font doesn't match the number given in the font list, a
fatal error message will be displayed and fontlib will abort.
The file \emtex\data\fontlist contains a list of all the fonts
that come with emTeX. fontlib searches the current working
directory and the `data' subdirectory of the emTeX directory
unless the filename contains a path. The emTeX directory is
specified by the environment variable EMTEXDIR. If EMTEXDIR
is not set, the emTeX directory defaults to \emtex, that is,
\emtex\data will be searched for the font list file.
/i After the command line has been interpreted, the user is
prompted for the operations required. More than one operation
can be entered on a line: input is ended when an empty line is
entered. In this interactive mode the entry of `?' will cause
the selected directory and the selected font size to be dis-
played.
/k Fonts already in the library will not be replaced. If neither
/k nor /r is given, fontlib will ask if an existing font is to
be replaced.
/l List the contents of the library; if the library is changed
by this call to fontlib, the contents of the new library will
be listed. For each font, the font name, the position in the
file, and the length will be displayed.
/r Fonts already in the library will be replaced without query.
If neither /k nor /r is given, fontlib will ask if an existing
font is to be replaced.
/t If /t is given, every file to be entered in the library will
be checked to make sure it is a valid font file. If /t is not
given, any file can be put in the library. If the library is
not modified, then this option causes the files already in the
library to be checked. Using /t causes the program to run
much more slowly. When checking, only font files with an ID
of 89 (PK), 1001 and 1002 (PXL) will be accepted. See also
/f*.
Extra data after the end of the data proper is considered an
error. This is a problem when transferring font files from
certain machines.
/v Messages showing the progress of the library processing will
be displayed. This option should always be used.
/w Existing files (library files and font files when copied from
the library) will be overwritten without query.
/x* Change the library comment; the comment must immediately
follow /x without a space. If the comment contains spaces,
then the comment must be enclosed in quotes:
/x"this is a comment"
If both /r and /k are given as options then only the last one will be
observed.
2.2 Operations
--------------
The actions to be taken by fontlib are specified by operations.
font size
Sets the font size for the operation which follow. fontlib
supports -- like dvidrv -- the following specifications of font
size:
328.63353
font size (DPI)
300:h 300 DPI * 1.2 ^ 0.5 (=328.63353)
:2 magnification step 2 (requires /b#)
[=]directory
The directory entered is taken to be the default directory for the
operations which follow. To avoid confusion, you should precede
the directory with an equal sign. The directory name may contain
%s and %r (font size (in DPI) and PXL font size, respectively).
library name
Entering a font library name is taken to mean that any font files
used in the operations which follow are to be taken from this li-
brary. The path name must not contain percent signs. If a direc-
tory name is entered, font files are assumed to be single files
again.
+name
This font file is to be copied into the library -- before this can
be done, the font size must be set (see above). The name can be
a path name in which case the file will be taken from the direc-
tory given; if the name alone is used, it will be prefixed with
the default directory. If no extension is given, first the file
will be sought under the name alone; if not found, it will then be
sought with the extension PK and then, if it is still not found,
with the extension PXL. The first file found will then be copied
into the library. The font name is derived from the file name by
omitting drive, directory, and extension. Capital letters will be
converted into lowercase. See /f*. If the name is to be selected
from a library then it may not be entered with a drive, directory
or extension. If the font is in the library and the /r option is
not in force, the user will be asked if it is to be replaced. If
the option /r has been given, however, the font will be replaced
without query.
If the font file isn't found, fontlib will apply the 5+3.3
truncation rule, then the 8.3 truncation rule to the filename.
-name
The font with this name and the selected size will be deleted from
the library. The name may not be entered with either a directory
or an extension.
&library
All the fonts in this library will be copied into the library
under construction. If the option /r has been chosen, fonts will
be replaced without query. The default extension used is FLI
and the current directory set by the `=directory' operation (see
above) will be ignored. If this library is an old one, you should
use /b# and /f*.
#name
Fonts will be copied from the library to individual files. The
name can be a path name and can have an extension which will be
used to place the copy. If no directory is given, the selected di-
rectory will be used. If no extension is given, the extension of
the file is derived from the type of the font: PK for PK fonts,
PXL for PXL fonts, and no extension otherwise. If the /w option
has been selected, existing files will be overwritten without
query. If /d is used, missing directories will be created.
Under DOS, the filename will be truncated according to the 5+3.3
rule. Under OS/2, this is done only when necessary. When
extracting individual files, you can control the truncation by
entering an appropriately truncated font name; however, this works
only if a font list file is used. For instance, you can extract
`lcirclew10' into `lcirclew.pk' or `lcircw10.pk'.
It is not possible to request 8.3 truncation when using
wild-cards.
@file
Read a response file, the library operations within will be
processed. A response file may contain calls to further response
files.
All font names may contain the wild-card characters `?' and `*' which
will be treated in the same way as PC-DOS and MS-DOS do. Note: if
wild-card characters are used with the +name operation an extension
must be given: `+*', for example, will find only files without an ex-
tension -- the correct form is `+*.pk' or `+*.pxl'. Caution: font
file names are case sensitive -- they should normally be entered in
lowercase. If you are using `?' or `+', you should give the /f* op-
tion.
If you specify an invalid operation, the program automatically goes
into interactive mode so that corrections can be made.
If no output file is given in the command line then the first
operation must not be a directory without preceding `=' as this would
be taken as the output file name: in this case the font size (or a di-
rectory preceded by `=') should be specified first.
3 Examples
==========
Create a new library (without prompting) and copy a number of fonts
into it. Use device resolution 300 DPI (to enable :0 and :1) and the
font list \emtex\data\fontlist for creating long font names:
fontlib /c /b300 /ffontlist hplaser =pxl%s :0 +*.pk :1 +*.pk
Combine three libraries (bib1, bib2, bib3) into one (output file
newlib) and remove the library comment:
fontlib /x bib1 newlib &bib2 &bib3
Convert an old FLI file to the new format, device resolution is 240
DPI:
fontlib /2 /b240 /ffontlist fx_1440 fx_1
Convert a new FLI file to the old format:
fontlib /1 fx_1 fx_1440
Copy a few fonts out of a library to PK files, displaying the actions
as they take place:
fontlib /w /v /b300 /d myfonts =c:\pixel\%rdpi :0 #cm*.pk :1 #lasy10.pk
Check and list the contents of a library (the number of characters in
each font listed with a number in \emtex\data\fontlist will be checked
too):
fontlib /l/t/ffontlist hplaser
Carry out large scale modifications with interactive input, display
all operations, replace fonts without query and include a new comment:
fontlib /i/v/r /x"New comment" c:epsonfx d:epsonfx
Create a new library (300 DPI base resolution) using a response file:
fontlib /c/v/ffontlist /b300 newlib =c:\newfonts\%rdpi @all.rsp
where all.rsp contains the following line:
:0 +*.pk :1 +*.pk :2 +*.pk :3 +*.pk :4 +*.pk :5 +*.pk :h +*.pk
4 History
=========
1.0a First usable version.
1.0b Fatal errors and warnings numbered.
Checking of font files.
`*' and `?' can be used in operations.
1.0c Font names shortened to 8 characters.
Interactive input with /i option.
Adding library files with: &library.
File and font overwriting query with: /w, /r.
Output file can be given.
1.0d PXL files with ID 1002 are accepted as valid.
1.0e File buffers increased.
1.0f @response files.
1.0g /k option.
Reading from library files.
1.0h Now runs under OS/2 (bound version)
1.0i "Disk full" did not always give an error message.
1.0j The greatest font size is now 66535 (earlier 32767).
1.1a New FLI file format.
New options: /1, /2, /b#, /d, /f*.
Specifying font sizes using DPI instead of PXL font size.
%s and %r in directory names.
Options starting with -.
1.1b Fix typo in message 2004.
1.1c Move `fontlist' from \emtex to \emtex\data.
Use EMTEXDIR to find font list file.
Support long file names on HPFS under OS/2.
Truncate names of font files using the 5+3.3 and 8.3 rules.
Automatically append .pk or .pxl when extracting fonts.
1.2a Avoid internal error 3012.