Info file: VFlib-36.info,    -*-Text-*-
produced by `texinfo-format-buffer'
from file `VFlib-36.texi'
using `texinfmt.el' version 2.38 of 3 July 1998.





 




File: VFlib-36.info, Node: Example vflibcap 2, Next: Example vflibcap 3, Prev: Example vflibcap 1, Up: Writing a vflibcap

Example vflibcap 2
==================

This vflibcap file is an example for TeX DVI drivers.  This vflibcap
file provides a set of fonts of the form `NAME.DVIpk' and `NAME.pk'.
For example, `cmr10.300pk' and `cmr10.pk'.

For Japanese Kanji character fonts `min5' ... `min10', `goth5'
... `goth10', `tmin5' .. `tmin10', `tgoth5' ... `tgoth10', X Window
PCF format font `jiskan24.pcf' is used via `ascii-jtex-kanji' font
driver.

Other fonts are solved in PK and GF format fonts.  If a font is not
available in these formats, a TFM font is used to produce a "black"
box.  (TFM files are metrics files and do not conatin glyph.  But TFM
driver in VFlib produces a "box" glyph as it ware font files.)

Parameters of device resolution and magnification factor for the
function `VF_OpenFont1()' determines the font size and font metrics to
be opened.

To use VFlib with this vflibcap file, I recommend to open font by
`VF_OpenFont1(NAME.pk, DPI, DPI, -1, MAG, MAG)', where `NAME.pk' is a
font name (e.g., `cmr10.pk'), DPI is the device resolution in dpi
(e.g., `300'), and MAG is the magnification factor (e.g., `1.2' for
magstep 1 fonts).

     ;; -----------------------------------------------------------------
     ;;   VFlib Default
     ;; -----------------------------------------------------------------
     (define-default VFlib
       (extension-hints  ("pk" TeX))
       (implicit-font-classes)
       (uncompression-programs  (".Z" "zcat") (".gz" "gzip -cd"))
       (variable-values  (TeX_USE_KPATHSEA      "Yes")
                         (TeX_DPI               "300")  ;; or "600"
                         (TeX_KPATHSEA_MODE     "cx")   ;; or "ljfour"
                         (TeX_KPATHSEA_PROGRAM  "/usr/local/bin/xldvi"))
       (use-kpathsea           $TeX_USE_KPATHSEA)
       (kpathsea-mode          $TeX_KPATHSEA_MODE)
       (kpathsea-program-name  $TeX_KPATHSEA_PROGRAM)
       (code-conversion-files  
        "iso8859-1_unicode.ccv" "iso8859-2_unicode.ccv" "iso8859-3_unicode.ccv"
        "iso8859-4_unicode.ccv" "iso8859-5_unicode.ccv" "iso8859-6_unicode.ccv"
        "iso8859-7_unicode.ccv" "iso8859-8_unicode.ccv" "iso8859-9_unicode.ccv"
        "jisx0201_unicode.ccv" "jisx0208_unicode.ccv" "jisx0212_unicode.ccv"
        "ksc5601_unicode.ccv"
        "gb12345_unicode.ccv" "gb2312_unicode.ccv"
        "big5_unicode.ccv" "cns11643_unicode.ccv"
        "iso8859-5_koi8-r.ccv" "koi8-r_iso8859-5.ccv" "koi8-r_unicode.ccv"))

     ;; -----------------------------------------------------------------
     ;;   TeX-related Font Class Default and TeX Font Mapper
     ;; -----------------------------------------------------------------
     (define-default  TeX
       (tfm-directories  "TEXMF")
       (tfm-filename-extensions  ".tfm")
       (font-mapping
        ((ascii-jtex-kanji "%f.jtex")  "min*" "goth*" "tmin*" "tgoth*")
        ((pk "%f.%dpk") (gf "%f.%dgf")  *)
        ((tfm "%f.%dtfm") *))
       (resolution-accuracy 0.02)
       (resolution-corrections
        (240  ;; sparcptr
         240  263  288  312  346  415  498  597)
        (300  ;; cx
         300  329  360  432  518  622  746  896 1075 1290  240 270)
        (400  ;; sparcptr
         400  438  480  576  691  829  995 1194 1433 1720  320 360)
        (600  ;; ljfour
         600  657  720  864 1037 1244 1493 1792 2150 2580  480 540))
       (dpi $TeX_DPI))

     ;; -----------------------------------------------------------------
     ;;   GF Font Class Default
     ;; -----------------------------------------------------------------
     (define-default gf
       (font-directories  "TEXMF"))

     ;; -----------------------------------------------------------------
     ;;   PK Font Class Default
     ;; -----------------------------------------------------------------
     (define-default pk
       (font-directories  "TEXMF"))

     ;; -----------------------------------------------------------------
     ;;   VF Font Class Default
     ;; -----------------------------------------------------------------
     (define-default vf
       (font-directories  "TEXMF")
       (font-mapping
        ((type1 "%f.pfb" point-size-from-tfm)  *) )
       (open-style "try")     ;; "none", "try", or "require"
       (glyph-style "fill"))  ;; "fill", or "empty"

     ;; -----------------------------------------------------------------
     ;;   TFM Font Class Default
     ;; -----------------------------------------------------------------
     (define-default tfm
       (glyph-style  "fill"))

     ;; -----------------------------------------------------------------
     ;;   ASCII-JTeX Kanji fonts
     ;; -----------------------------------------------------------------
     (define-default  ascii-jtex-kanji
       (tfm-directories  "TEXMF")
       (implicit-font-mapping-suffix ".jtex"))

     ;; -----------------------------------------------------------------
     ;; Type1 Font Class Default
     ;; -----------------------------------------------------------------
     (define-default type1
       (font-directories  "TEXMF")
       (afm-directories   "TEXMF")
       (log-level "none")
       (dpi $TeX_DPI))

     ;; -----------------------------------------------------------------
     ;; TrueType Font Class Default
     ;; -----------------------------------------------------------------
     (define-default truetype
       (font-directories  "TEXMF")
       (platform-id "microsoft")
       (dpi $TeX_DPI))
  
     ;; -----------------------------------------------------------------
     ;;   PCF Font Class Default
     ;; -----------------------------------------------------------------
     (define-default  pcf
       (font-directories  "/usr/X11R6/lib/X11/fonts//"
                          "/usr/local/X11R6/lib/X11/fonts//"
                          "/usr/openwin/lib/X11/fonts//"
                          "/usr/X386/lib/X11/fonts//"
                          "/usr/XFree86/lib/X11/fonts//"
                          "/usr/X11/lib/X11/fonts//"
                          "/usr/local/lib/X11/fonts//"
                          "/usr/X11R5/lib/X11/fonts//"
                          "/usr/local/X11R5/lib/X11/fonts//"
                          "/usr/local/share/fonts/X11//")
       (compression-extensions ".gz" ".Z")
       (dpi $TeX_DPI))


     ;; -----------------------------------------------------------------
     ;;  Japanese Kanji fonts using standard X11 PCF fonts
     (define-font jtex-min    (font-class pcf) (font-file "jiskan24.pcf"))
     (define-font jtex-goth   (font-class pcf) (font-file "jiskan24.pcf"))
     (define-font jtex-tmin   (font-class pcf) (font-file "jiskan24.pcf"))
     (define-font jtex-tgoth  (font-class pcf) (font-file "jiskan24.pcf"))

     (define-macro min-common
       (font-class ascii-jtex-kanji) (kanji-font jtex-min)
       (kanji-font-magnification 0.85) (metric-adjustment-file "jiskan24.adj"))
     (define-macro goth-common
       (font-class ascii-jtex-kanji) (kanji-font jtex-goth)
       (kanji-font-magnification 0.85) (metric-adjustment-file "jiskan24.adj"))
     (define-macro tmin-common
       (font-class ascii-jtex-kanji) (kanji-font jtex-tmin)
       (kanji-font-magnification 0.85) (metric-adjustment-file "jiskan24v.adj"))
     (define-macro tgoth-common
       (font-class ascii-jtex-kanji) (kanji-font jtex-tgoth)
       (kanji-font-magnification 0.85) (metric-adjustment-file "jiskan24v.adj"))

     (define-font min5.jtex     (kanji-font-point-size  5)  min-common)
     (define-font min6.jtex     (kanji-font-point-size  6)  min-common)
     (define-font min7.jtex     (kanji-font-point-size  7)  min-common)
     (define-font min8.jtex     (kanji-font-point-size  8)  min-common)
     (define-font min9.jtex     (kanji-font-point-size  9)  min-common)
     (define-font min10.jtex    (kanji-font-point-size 10)  min-common)
     (define-font goth5.jtex    (kanji-font-point-size  5)  goth-common)
     (define-font goth6.jtex    (kanji-font-point-size  6)  goth-common)
     (define-font goth7.jtex    (kanji-font-point-size  7)  goth-common)
     (define-font goth8.jtex    (kanji-font-point-size  8)  goth-common)
     (define-font goth9.jtex    (kanji-font-point-size  9)  goth-common)
     (define-font goth10.jtex   (kanji-font-point-size 10)  goth-common)
     (define-font tmin5.jtex    (kanji-font-point-size  5)  tmin-common)
     (define-font tmin6.jtex    (kanji-font-point-size  6)  tmin-common)
     (define-font tmin7.jtex    (kanji-font-point-size  7)  tmin-common)
     (define-font tmin8.jtex    (kanji-font-point-size  8)  tmin-common)
     (define-font tmin9.jtex    (kanji-font-point-size  9)  tmin-common)
     (define-font tmin10.jtex   (kanji-font-point-size 10)  tmin-common)
     (define-font tgoth5.jtex   (kanji-font-point-size  5)  tgoth-common)
     (define-font tgoth6.jtex   (kanji-font-point-size  6)  tgoth-common)
     (define-font tgoth7.jtex   (kanji-font-point-size  7)  tgoth-common)
     (define-font tgoth8.jtex   (kanji-font-point-size  8)  tgoth-common)
     (define-font tgoth9.jtex   (kanji-font-point-size  9)  tgoth-common)
     (define-font tgoth10.jtex  (kanji-font-point-size 10)  tgoth-common)
     ;; -----------------------------------------------------------------
     ;; EOF




File: VFlib-36.info, Node: Example vflibcap 3, Prev: Example vflibcap 2, Up: Writing a vflibcap

Example vflibcap 3
==================

This is an example for TeX DVI drivers.  This vflibcap desgnates VFlib
to use PK files.  For missing PK files, black "boxes" by TFM fonts are
used as substitutes of glyphs of PK files

     ;; -----------------------------------------------------------------
     ;;   VFlib Default
     ;; -----------------------------------------------------------------
     (define-default VFlib
       (extension-hints  ("pk" TeX) ("gf" TeX))
       (implicit-font-classes)
       (uncompression-programs  (".Z" "zcat") (".gz" "gzip -cd"))
       (variable-values  (TeX_USE_KPATHSEA      "Yes")
                         (TeX_DPI               "300")  ;; or "600"
                         (TeX_KPATHSEA_MODE     "cx")   ;; or "ljfour"
                         (TeX_KPATHSEA_PROGRAM  "/usr/local/bin/xldvi"))
       (use-kpathsea           $TeX_USE_KPATHSEA)
       (kpathsea-mode          $TeX_KPATHSEA_MODE)
       (kpathsea-program-name  $TeX_KPATHSEA_PROGRAM))

     ;; -----------------------------------------------------------------
     ;;   TeX-related Font Class Default and TeX Font Mapper
     ;; -----------------------------------------------------------------
     (define-default  TeX
       (tfm-directories  "TEXMF"
                         "/usr/local/lib/jtex/fonts"
                         "/usr/local/lib/tex/fonts")
       (tfm-filename-extensions  ".tfm")
       (font-mapping
        ((pk "%f.%dpk") *)
        ((tfm "%f.%dtfm") *))
       (resolution-accuracy 0.02)
       (resolution-corrections
        (240  ;; sparcptr
         240  263  288  312  346  415  498  597)
        (300  ;; cx
         300  329  360  432  518  622  746  896 1075 1290  240 270)
        (400  ;; sparcptr
         400  438  480  576  691  829  995 1194 1433 1720  320 360)
        (600  ;; ljfour
         600  657  720  864 1037 1244 1493 1792 2150 2580  480 540))
       (dpi $TeX_DPI))

     ;; -----------------------------------------------------------------
     ;;   PK Font Class Default
     ;; -----------------------------------------------------------------
     (define-default pk
       (font-directories "TEXMF"))

     ;; -----------------------------------------------------------------
     ;;   TFM Font Class Default
     ;; -----------------------------------------------------------------
     (define-default tfm
       (glyph-style  "fill"))

     ;; -----------------------------------------------------------------
     ;EOF






File: VFlib-36.info, Node: Debugging a vflibcap, Next: Code conversion system, Prev: Writing a vflibcap, Up: Top

Debugging a vflibcap
********************

There is no utility programs that checks syntax of a vflibcap file.
But VFlib checks syntax of vflibcap file when a font driver is
initialized or a font is opened.

VFlib prints a message to inform a user if syntax is illegal,
undefined capability is used (this may be a typographical error),
essential capability is missing, an undefined macro is used, or forms
of capability values are illegal.

The following Unix environment variables are used to print debugging
messages.

`VFLIB_DEBUG_FONT_OPEN'
       -- If this environment variable is defined, the processes of
     font opens are printed.

`VFLIB_DEBUG_FONT_SEARCH'
       -- If this variable is defined, the processes of font opens are
     printed

`VFLIB_DEBUG_VFLIBCAP'
       -- If this variable is defined, the process of reading of
     vflibcap file is printed.

`VFLIB_DEBUG_PARAMETERS'
       -- If this variable is defined, VFlib prints how parameters
     (variables) in vflibcap file are substituted.

`VFLIB_DEBUG_CCV'
       -- If this variable is defined, the process of reading CCV
     files is printed.

`VFLIB_DEBUG_CCV_MAPPING'
       -- If this variable is defined, encoding conversions by CCV are
     printed.








File: VFlib-36.info, Node: Code conversion system, Next: Utility programs, Prev: Debugging a vflibcap, Up: Top

Code conversion system
**********************


Code conversion system (CCV) is used to convert from a character set
and an encoding to another.  For example, a font of Unicode character
set and Unicode encoding can be accessed as ISO 8859-2 character set
of ISO encoding by encoding conversion.  TrueType font class makes use
of this feature to hide invisible internal font encoding scheme and
provides desired external view to users.

Conversion rule is given by one of the following two methods
   * Internal functions in VFlib (written in C) These functions are
     hardcoded and new conversions rules cannot be added without
     modifying source code.
   * External files, called CCV files.  A list of CCV files to be used
     is specified in `code-conversion-files' capability of `VFlib'
     default.



How CCV works
=============

Each conversion rule has the following information.

   * EXTERNAL charset name
   * EXTERNAL encoding name
   * INTERNAL charset name
   * INTERNAL encoding name
   * other info such as format and size of conversion table... 

On invocation of VFlib, these information is read from each CCV files.
(CCV files are not fully loaded at initialization of VFlib; VFlib just
checks relation of conversion.  Conversion tables, which can be large,
are loaded on demand.)  In addition, when VFlib is initialized,
internal CCV functions are installed and these information is given
for each conversion function.

"EXTERNAL" means external view (i.e., user side encoding) and
"INTERNAL" means internal view (i.e., font encoding).  Users can
define arbitrary charset and encoding names, except that some font
driver may predefined names for internal use.  (TrueType font driver
uses some predefined names, such as "unicode".)

CCV system has a conversion table searching mechanism.  Table is
searched by source charset/encoding names and destination
charset/encoding names.  If there is a CCV file listed in
`code_conversion_files' capability of `VFlib' defaults entry in
vflibcap that matches charset and encoding name, the CCV file is
dynamically loaded and used for code conversion.

For example, a CCV file iso8859-1_unicode.ccv has the following
charset/encoding names:

   * EXTERNAL charset name:      ISO8859-1
   * EXTERNAL charset encoding:  ISO
   * INTERNAL charset name:      UNICODE
   * INTERNAL charset encoding:  UNICODE

By this CCV file, a unicode font can be viewed as a ISO encoding of
ISO 8859-1 charset. (It is very important to note that names are just
symbols and not have any meaning; in the above example, conversion to
ISO encoding is implemented by conversion table body in CCV file.)

In the current implementation, BDF, PCF, HBF, and TrueType font
drivers use CCV system.  In the following, how TrueType font driver
uses CCV is described.

Each TrueType font has information about charset name and encoding
name of the font.  When a font entry is defined in vflibcap file and
`encoding' and `character-set' capability is defined, say, E and C
respectively. According to internal charset and encoding information
of TrueType font, the driver searches a CCV table, when the VFlib font
is opened, that matches the following conversion relation.

   * EXTERNAL charset name:      E
   * EXTERNAL charset encoding:  C
   * INTERNAL charset name:      possibly, UNICODE (from font file info)
   * INTERNAL charset encoding:  possibly, UNICODE (from font file info)

If not found, conversion is impossible. If found, a CCV file found is
used.  After a font is opened, CCV table is used for converting code
points for VFlib operation such as `VF_GetBitmap1()'.



The internal (hardcoded) CCV functions
======================================
VFlib has several hardcoded CCV functions.  Followings CCV functions
are implemented.


   * from ISO-2022 (`ISO2022') to Shift JIS (`SJIS')

   * from Shift JIS (`SJIS') to ISO 2022 (`ISO2022')

   * from EUC (`EUC') to ISO 2022 (`ISO2022')

   * from Row-Cell (`Row-Cell') to ISO 2022 (`ISO2022')

   * from ISO-2022 (`ISO2022') to Row-Cell (`Row-Cell')

   * from ISO-2022 (`ISO2022') to WanSung (`WanSung')

   * from Row-Cell (`Row-Cell') to WanSung (`WanSung')

   * from ISO-2022 (`ISO2022') to Sequential Numbering
     (`Sequential2-0' and `Sequential2-1')

     By these encoding schemes, characters are numbered sequentially
     starting from 0 (`Sequential2-0') or 1 (`Sequential2-1').  That
     is, `Sequential2-0' encoding is an encoding such that code of the
     first character is 0, code of the second is 1, ..., and code of
     the i-th character is (i-1).  `Sequential2-1' encoding is an
     encoding such that code of the first character is 1, code of the
     second is 2, ..., and code of the i-th is (i).  External code
     point must be encoded two-byte, i.e., 0x2121...7e7e.  These
     values are converted to 0...8835 or 1...8836.


Encoding name `JIS' is defined as an alias of `ISO2022'.  Encoding
name `Ku-Ten' is defined as an alias of `Row-Cell'.  Note that these
aliases are defined only for hardcorded CCV functions.

All of these are implemented simple arithmetic and large conversion
tables are not necessary in memory.



The syntax of CCV files
=======================

The syntax of CCV files is lisp-like notation, similar to vflibcap
files.  The CCV file defines its own directive set, explained below.
A code conversion table is divided in several sub-tables to reduce the
file size (and memory size when the file is loaded into memory).  The
sub-tables are called `blocks'.

`(charset-external-name FROM-CS-NAME)'
`(charset-external-encoding FROM-CS-ENC)'
`(charset-internal-name TO-CS-NAME)'
`(charset-internal-encoding TO-CS-ENC)'
     --- These four directives describes character set and encoding information 
     of conversion.

`(table-type TYPE)'
     TYPE must be one of the following:
        `array'
        `random-arrays'

`(c1-min C1MIN)'
`(c1-max C1MAX)'
`(c2-min C2MIN)'
`(c2-max C2MAX)'
`(block-size SIZE)'
`(nblocks NBLOCKS)'
`(block BLOCK CODE0 CODE1 ...)'

Let C be a code point of a character to be converted by this CCV file.

It is converted as follows.  Let C1 be C/SIZE and C2 be C modulo SIZE.
The block number B that should be referred to is C1-C1MIN.  The
position I in the block B is C2-C2MIN.  Thus, the value of I-th entry
of a block numbered B is converted code point.

C1MAX, C2MAX and NBLOCKS are used internally to determine the
necessary memory area to load the table.

Theoretically, `array' is enough for the value for `table-type'
directive.  But in case that there are many blocks that do not have
conversion entries.  This is happen in the case of CNS11643 character
set (a Hanji character set in Taiwan).  To reduce the table size, some
of blocks can be omitted by giving `random-array' for `table-type'
directive.

In case of `array', lookup for code conversion is implemented by
indexing an entire array, which is very fast.  In case of
`random-array', lookup for code conversion takes time to find a
corresponding sub-table (block), since the table is not linear.




Example of a CCV file 1
=======================

The following example is a CCV file that virtually provides a ISO
8859-1 character set font using a Unicode font.  That is, a Unicode
font can be used as if it were a ISO 8859-1 font by the CCV file.
This file is distributed with VFlib and installed by the name
`iso8859-1_unicode.ccv'.

This file is a table indexed by code points of ISO 8859-1; contents of
table entries are Unicode code points.


     ; Conversion table: ISO8859-1 ==> UNICODE
     (charset-external-name ISO8859-1)
     (charset-external-encoding ISO)
     (charset-internal-name UNICODE)
     (charset-internal-encoding UNICODE)
     (table-type array)
     ; Code point C is converted to C' by the following formula:
     ;   C' = Table[(c1 - c1min)*M + (c2 - c2min)],
     ;   where c1 = C/B and c2 = C%B, and M = c2max - c2min + 1.
     ;   B is a block size given by the 'block-size:' parameter.
     (c1-min 0x0)
     (c1-max 0x0)
     (c2-min 0x20)
     (c2-max 0xff)
     (block-size 256)
     (nblocks 1)
     ; 0x0020 ... 0x00ff
     (block 0
         0x0020 0x0021 0x0022 0x0023 0x0024 0x0025 0x0026 0x0027 
         0x0028 0x0029 0x002a 0x002b 0x002c 0x002d 0x002e 0x002f 
         0x0030 0x0031 0x0032 0x0033 0x0034 0x0035 0x0036 0x0037 
         0x0038 0x0039 0x003a 0x003b 0x003c 0x003d 0x003e 0x003f 
         0x0040 0x0041 0x0042 0x0043 0x0044 0x0045 0x0046 0x0047 
         0x0048 0x0049 0x004a 0x004b 0x004c 0x004d 0x004e 0x004f 
         0x0050 0x0051 0x0052 0x0053 0x0054 0x0055 0x0056 0x0057 
         0x0058 0x0059 0x005a 0x005b 0x005c 0x005d 0x005e 0x005f 
         0x0060 0x0061 0x0062 0x0063 0x0064 0x0065 0x0066 0x0067 
         0x0068 0x0069 0x006a 0x006b 0x006c 0x006d 0x006e 0x006f 
         0x0070 0x0071 0x0072 0x0073 0x0074 0x0075 0x0076 0x0077 
         0x0078 0x0079 0x007a 0x007b 0x007c 0x007d 0x007e -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         0x00a0 0x00a1 0x00a2 0x00a3 0x00a4 0x00a5 0x00a6 0x00a7 
         0x00a8 0x00a9 0x00aa 0x00ab 0x00ac 0x00ad 0x00ae 0x00af 
         0x00b0 0x00b1 0x00b2 0x00b3 0x00b4 0x00b5 0x00b6 0x00b7 
         0x00b8 0x00b9 0x00ba 0x00bb 0x00bc 0x00bd 0x00be 0x00bf 
         0x00c0 0x00c1 0x00c2 0x00c3 0x00c4 0x00c5 0x00c6 0x00c7 
         0x00c8 0x00c9 0x00ca 0x00cb 0x00cc 0x00cd 0x00ce 0x00cf 
         0x00d0 0x00d1 0x00d2 0x00d3 0x00d4 0x00d5 0x00d6 0x00d7 
         0x00d8 0x00d9 0x00da 0x00db 0x00dc 0x00dd 0x00de 0x00df 
         0x00e0 0x00e1 0x00e2 0x00e3 0x00e4 0x00e5 0x00e6 0x00e7 
         0x00e8 0x00e9 0x00ea 0x00eb 0x00ec 0x00ed 0x00ee 0x00ef 
         0x00f0 0x00f1 0x00f2 0x00f3 0x00f4 0x00f5 0x00f6 0x00f7 
         0x00f8 0x00f9 0x00fa 0x00fb 0x00fc 0x00fd 0x00fe 0x00ff )



Example of a CCV file 2
=======================

The following example is a CCV file that virtually provides a CNS
11643 Plane 1 character set font using a Unicode font.  This file is
distributed with VFlib and installed by the name
`cns11643-1_unicode.ccv'.

This file is an example of CCV files that have `random-arrays' for
`table-type' directive.

     ; Conversion table: CNS11643-1 ==> UNICODE
     (charset-external-name CNS11643-1)
     (charset-external-encoding ISO2022)
     (charset-internal-name UNICODE)
     (charset-internal-encoding UNICODE)
     (table-type random-arrays)
     ; Code point C is converted to C' by the following formula:
     ;   C' = Table[(c1 - c1min)*M + (c2 - c2min)],
     ;   where c1 = C/B and c2 = C%B, and M = c2max - c2min + 1.
     ;   B is a block size given by the 'block-size:' parameter.
     (c1-min 0x121)
     (c1-max 0xe67)
     (c2-min 0x21)
     (c2-max 0x7e)
     (block-size 256)
     (nblocks 218)
     ; 0x12121 ... 0x1217e
     (block 0
         0x3000 0xff0c 0x3001 0x3002 0xff0e 0x30fb 0xff1b 0xff1a 
         0xff1f 0xff01 0xfe30 0x2026 0x2025 0xfe50 0xfe51 0xfe52 
         0x00b7 0xfe54 0xfe55 0xfe56 0xfe57 0xfe31 0x2014 0xfe32 
         0x2013 -1     -1     -1     -1     0xff08 0xff09 0xfe35 
         0xfe36 0xff5b 0xff5d 0xfe37 0xfe38 0x3014 0x3015 0xfe39 
         0xfe3a 0x3010 0x3011 0xfe3b 0xfe3c 0x300a 0x300b 0xfe3d 
         0xfe3e 0x3008 0x3009 0xfe3f 0xfe40 0x300c 0x300d 0xfe41 
         0xfe42 0x300e 0x300f 0xfe43 0xfe44 0xfe59 0xfe5a 0xfe5b 
         0xfe5c 0xfe5d 0xfe5e 0x2018 0x2019 0x201c 0x201d 0x301d 
         0x301e 0x2032 0x2035 0xff03 0xff06 0xff0a 0x203b 0x00a7 
         0x3003 0x25cb 0x25cf 0x25b3 0x25b2 0x25ce 0x2606 0x2605 
         0x25c7 0x25c6 0x25a1 0x25a0 0x25bd 0x25bc )
     ; 0x12221 ... 0x1227e
     (block 1
         0x32a3 0x2105 0x203e -1     0xff3f -1     0xfe49 0xfe4a 
         0xfe4d 0xfe4e 0xfe4b 0xfe4c 0xfe5f 0xfe60 0xfe61 0xff0b 
         0xff0d 0x00d7 0x00f7 0x00b1 0x221a 0xff1c 0xff1e 0xff1d 
         0x2266 0x2267 0x2260 0x221e 0x2252 0x2261 0xfe62 0xfe63 
         0xfe64 0xfe66 0xfe65 0x223c 0x2229 0x222a 0x22a5 0x2220 
         0x221f 0x22bf 0x33d2 0x33d1 0x222b 0x222e 0x2235 0x2234 
         0x2640 0x2642 0x2641 0x2609 0x2191 0x2193 0x2192 0x2190 
         0x2196 0x2197 0x2199 0x2198 0x2016 0xff5c 0xff0f 0xff3c 
         0x2215 0xfe68 0xff04 0xffe5 0x3012 0xffe0 0xffe1 0xff05 
         0xff20 0x2103 0x2109 0xfe69 0xfe6a 0xfe6b 0x33d5 0x339c 
         0x339d 0x339e 0x33ce 0x33a1 0x338e 0x338f 0x33c4 0x00b0 
         0x5159 0x515b 0x515e 0x515d 0x5161 0x5163 )
     ; 0x12321 ... 0x1237e
     (block 2
         0x55e7 0x74e9 0x7cce 0x2581 0x2582 0x2583 0x2584 0x2585 
         0x2586 0x2587 0x2588 0x258f 0x258e 0x258d 0x258c 0x258b 
         0x258a 0x2589 0x253c 0x2534 0x252c 0x2524 0x251c 0x2594 
         0x2500 0x2502 0x2595 0x250c 0x2510 0x2514 0x2518 0x256d 
         0x256e 0x2570 0x256f 0x2550 0x255e 0x256a 0x2561 0x25e2 
         0x25e3 0x25e5 0x25e4 0x2571 0x2572 0x2573 -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     )

     ... IT'S VERY LONG, SNIP, SNIP, SNIP ...

     ; 0xe6621 ... 0xe667e
     (block 3397
         0x7bd0 0x7c2f 0x7c32 0x7c42 0x7c4e 0x7c68 0x7ca9 0x7ced 
         0x7dd0 0x7e07 0x7dd3 0x7e64 0x7f40 -1     0x8041 0x8063 
         0x80bb 0x6711 0x6725 0x8248 0x8310 0x8362 0x8312 0x8421 
         0x841e 0x84e2 0x84de 0x84e1 0x8573 0x85d4 0x85f5 0x8637 
         0x8645 0x8672 0x874a 0x87a9 0x87a5 0x87f5 0x8834 0x8850 
         0x8887 0x8954 0x8984 0x8b03 0x8c52 0x8cd8 0x8d0c 0x8d18 
         0x8db0 0x8ebc 0x8ed5 0x8faa 0x909c -1     0x915c 0x922b 
         0x9221 0x9273 0x92f4 0x92f5 0x933f 0x9342 0x9386 0x93be 
         0x93bc 0x93bd 0x93f1 0x93f2 0x93ef 0x9422 0x9423 0x9424 
         0x9467 0x9466 0x9597 0x95ce 0x95e7 0x973b 0x974d 0x98e4 
         0x9942 0x9b1d 0x9b98 -1     0x9d49 0x6449 0x5e71 0x5e85 
         0x61d3 0x990e 0x8002 0x781e -1     -1     )
     ; 0xe6721 ... 0xe677e
     (block 3398
         0x5528 0x5572 0x55ba 0x55f0 0x55ee 0x56b8 0x56b9 0x56c4 
         0x8053 0x92b0 -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     -1     -1     
         -1     -1     -1     -1     -1     -1     )






File: VFlib-36.info, Node: Utility programs, Next: Sample programs, Prev: Code conversion system, Up: Top


Utility programs
****************

* Menu:

* vflmkcaptex::
* vflpp::
* vflmkfdb::
* vfldrvs::




File: VFlib-36.info, Node: vflmkcaptex, Next: vflpp, Up: Utility programs

vflmkcaptex
===========


`vflmkcaptex' is a utility program to generate vflibcap file for TeX
DVI driver software automatically.  With simple command line
arugments, a vflibcap that uses PK, GF, Virtual Font, Type 1 fonts
with complex TeX font mapping rules.

Usage: vflmkcaptex [ OPTIONS... ] [ CLASS... ]

Usage: vflmkcaptex [ SHORTCUT ] [ OPTIONS... ]

`CLASS...' is a list of font class names to support by vflibcap file
to be generated.  `OPTIONS...' is option list to customize default
settings.  `SHORTCUT' is a shortcut name to typical options and class
name list.

Shortcut:


minimum
     This is the same as command line option pk.  Use PK fonts only.

simple
     This is the same as command line option -g pk tfm.  Use PK fonts.
     If PK font file is missing, it is generated on-the-fly.  If font
     cannot be created, black square is displayed instead of character
     glyph (as long as corresponding TFM file exists).

standard
     This is the same as command line option -t1 -g.  Use default
     class list type1 vf pk tfm.  Missing PK font is created
     on-the-fly.

simple-ja
     This is the same as command line option -g pk tfm -jtex -jisx0212
     -jpcf.  (Japanese support for simple shortcut.)

standard-ja
     This is the same as command line option -t1 -g -jtex -jisx0212
     -jpcf.  (Japanese support for standard shortcut.)



Font class list:


gf
     Enables to use GF font files.  For searching font files, kpathsea
     is used.  That is, font files are searched under TeX `texmf'
     directory (typically, `/usr/local/share/texmf').

pk
     Enables to use PK font files.  For searching font files, kpathsea
     is used.

vf
     Enables to use Virtual Font files.  For searching font files,
     kpathsea is used.

tfm
     Enables to use TFM files.  This option enables to display black
     square instead of glyph.  The size of square obeys font metric of
     each character.  This is useful when glyph file (e.g., PK, Type1)
     is missing.

type1
     Enables to use Type 1 fonts.  (Currently, it supports Roman
     fonts. CJK fonts are not supported.)  For searching font files,
     kpathsea is used.

     By this option, font definitions for PostScript fonts used in TeX
     DVI files are generated by reading `psfonts.map' of `dvips'.
     Each PostScript font listed in `psfonts.map' is checked if it
     exists.  (For PostScript fonts, this program automatically
     searchs Adobe Acrobat 3 and 4 font directories.)  If a PostScript
     font in question is not found, `Ghostscript' font definition file
     `Fontmap' is checked to substitute the font by a font in
     `Ghostscript' font directory.

     This feature is very useful for displaying and printing TeX DVI
     files with PostScript fonts.  So, I recommned obtain Adobe
     Acrobat 3 and 4 for Type 1 PostScript fonts.  (Linux version are
     freely available.)


When a font is requested to open, the font is tried to open by font
classes by the order in the command line.

So, by a `vflibcap' generated by the following example, font in PK
format is rearched first.  If a font in PK format is not found, font
in Type 1 format is searched next.
     vflmkcaptex pk type1

Therefore, the order of font classes decides the priority of font file
formats to search.


Options:


--help
     Print a list of command line options and exit.

--version
     Print version number of this program and exit.

-p PROG
     Application program name. This is used by kpathsea for font file
     search. Default is xgdvi, which is a DVI previewer in the TeX-Guy
     package.

-n MODE
     Device mode name for font file search, used by kpathsea.  Default
     is cx
  
-r DPI
     Device resolution in DPI. Default is 300.

     If this option is not given, `vflmkcaptex' reads `mode.mf', which
     is a device mode definition file for METAFONT, and obtains revice
     resolution automatically.

-g
     Configure `vflibcap' to generate non-existing PK files
     on-the-fly.

-pk
     When `CLASS...' is not given, default font class set is assumed
     by default.  For such case, generate a `vflibcap' to search PK
     font file before searching Type 1 font by this option.

-t1
     When `CLASS...' is not given, generate a `vflibcap' to search
     Type 1 font file before searching PK font file by this option.


Options for Japanese TeX support:

-jtex
     Generate font definitions for JIS X0208 character set used by
     Japanese TeX.  By default, a `vflibcap' to be generated uses
     Japanese Kanji character in PCF format (in X11 font directory).
     See also `-jpcf', `-jekanji' and `-jttf' options.

-jisx0212
     Generate font definitions for JIS X0208 character set used by
     Japanese TeX.  Note that generated font names are not standard.
     It is used for private use of the author.

-jpcf
     Switch to use PCF fonts for Japanese Kanji characters.  (This is
     the default.)

-jekanji
     Switch to use eKanji fonts for Japanese Kanji characters.  See
     *Note eKanji font class:: for detail about eKanji fonts.

-jttf
     Switch to use TrueType fonts for Japanese Kanji characters.

-jpfd DIR
     Add a PCF font directory.  `vflmkcaptex' checks typical X11 PCF
     font directories and existing directories are added to PCF font
     directory list.  This option should be used when you want to add
     optional (and not automatically detected) PCF font directory.
     This option can be used multiple times.

-jefd DIR
     Add a eKanji font directory.  This option can be used multiple
     times.

-jtfd DIR
     Add a TrueType font directory.  This option can be used multiple
     times.


-jtdb FILE
     By this option, an external definition database file FILE is read
     for generating definitions of non-standard TeX Japanese fonts
     using Japanese TrueType font files.  Each line in FILE is a pair
     of (1) font name used in TeX and (2) TrueType font file name.
     Following is an example:

          dfailpaa dcail5.ttc
          dfainpaa dcai5.ttc
          dfaispaa dcais5.ttc
          dfbrrsaa dfbrr7.ttc
          dfbrrzaa dfbrrc.ttc
          dfbrspaa dfbrs5.ttc
          dfbrsvaa dfbrs9.ttc
          dfbrszaa dfbrsc.ttc

     See files in a directory `ascii-jtex/' for detail.



`vflmkcaptex' is a Unix Shell script.  It uses following programs to
generate a `vflibcap' file.  Descriptions the followng programs are
ommited since most of users never use them directly.  For details,
invoke each program with `--help' option to see how to use it.

`vflmkvfl'
       A generator for VFlib defaults.  (See *Note VFlib defaults::.)
`vflmktex'
       A generator for TeX mapping class.  (See *Note TeX default and
     TeX font mapping font class::.)
`vflmkpk'
       A generator for PK class.  (See *Note PK font class::.)
`vflmkgf'
       A generator for GF class.  (See *Note GF font class::.)
`vflmkvf'
       A generator for Virtual Font class.  (See *Note VF font
     class::.)
`vflmktfm'
       A generator for TFM class.  (See *Note TFM font class::.)
`vflmkt1'
       A generator for Type 1 class.  (See *Note Type1 font class::.)
`vflmkekan'
       A generator for eKanji class.  (See *Note eKanji font class::.)
`vflmkajt'
       A generator for ASCII Japanese TeX class.  (See *Note ASCII
     Japanese TeX Kanji font class::.)






File: VFlib-36.info, Node: vflpp, Next: vflmkfdb, Prev: vflmkcaptex, Up: Utility programs

vflpp
=====

`vflpp' prettyprints (i.e., grinds) a vflibcap file.  It eliminate all
comment strings and unnecessary space and newline characters.

Usage: vflpp [ VFLIBCAP-FILE ]

A program `vflpp' prettyprints a file VFLIBCAP to standard output.  If
no argument is given, `vflpp' reads from standard input.





File: VFlib-36.info, Node: vflmkfdb, Next: vfldrvs, Prev: vflpp, Up: Utility programs

vflmkfdb
========


Usage: vflmkfdb FONT-DIRECTORY [ ... ]

A program `vflmkfdb' makes a font file hint database (FDB for short)
in a font directories given in the command line argument.

It is used in a font file search module in VFlib.  In case there are
many font files in many directories, search a font file consumes much
time to traverse directory hierarchy.  FDB file contains pairs of file
name and path name to the file in a single file. By reading FDB file,
a font file can be found without traversing directories.

For each FONT-DIRECTORY, a FDB file named `VFlib.fdb' is created in
the directory.




File: VFlib-36.info, Node: vfldrvs, Prev: vflmkfdb, Up: Utility programs

vfldrvs
=======


Usage: vfldrvs

A program `vfldrvs' prints a list of pre-installed font drivers in
VFlib.





File: VFlib-36.info, Node: Sample programs, Next: Difference between VFlib version 3.6 and 2, Prev: Utility programs, Up: Top

Sample programs
***************

* Menu:

* vflserver::
* vfltest::
* vflx11::
* vfldisol::
* ctext2pgm::



File: VFlib-36.info, Node: vflserver, Next: vfltest, Up: Sample programs

vflserver
=========

`vflserver' is a font server that provides the functionality of VFlib
via network.

`vflserver' can be invokes from command line or via network.


* Menu:

* Using vflserver from command line::
* Using vflserver via network::
* The protocol of vflserver::



File: VFlib-36.info, Node: Using vflserver from command line, Next: Using vflserver via network, Up: vflserver

Using vflserver from command line
---------------------------------

Usage: vflserver [-v VFLIBCAP] [-s SHRINK] [CMD-FILE ...]

`vflserver' receives a command, executes it, and return a result.
This is repeated until connection is closed or quit command is
executed.  `vflserver' reads a sequence of command from standard input
if CMD-FILE option is not given.

Options:


-v VFLIBCAP
     A file name of vflibcap to be used. If this option is not given,
     default vflibcap file is used. (Possibly, default vflibcap is
     `/usr/local/share/VFlib/3.6.14/vflibcap'.)
  
-s SHRINK
     `vflserver' has a feature to print obtained bitmaps in ASCII-art
     style for debugging purpose.  When this feature is enabled,
     bitmaps are shrinked by this factor.  This is effective when
     obtained bitmaps are huge.

CMD-FILE ...
     A sequence of commands can be read from files.  Commands in files
     CMD-FILE ... are executed in given order.  After executing all
     files, `vflserver' reads a sequence of commands from standard
     input.  Thus, quit command may be explicitly given in CMD-FILE.
     This option is effective in the process of font driver
     development to do the same commands many times.





File: VFlib-36.info, Node: Using vflserver via network, Next: The protocol of vflserver, Prev: Using vflserver from command line, Up: vflserver

Using vflserver via network
---------------------------

Before using `vflserver' via network, it must be installed to be
invoked by `inetd'.  You must be a root to do the following
procedures.

First, edit `/etc/services':

   * Network service name: vflserver
   * Well known port: 4681
   * Protocol: tcp

Add the following line to `/etc/inetd.conf'.

     vflserver stream tcp nowait nobody /usr/local/bin/vflserver vflserver 

If you need to explicitly specify a vflibcap file to be used, you must
give `-v' option as follows:

     vflserver stream tcp nowait nobady /usr/local/bin/vflserver vflserver -v /foo/vflibcap

To force inetd to re-read `inetd.conf', send a HUP signal to inetd.

We finished installing vflserver to use via network.  Now, use
`telnet' to check if `vflserver' is correctly installed to network
service.  The following an example interaction.

     % telnet localhost vflserver
     Trying 127.0.0.1...
     Connected to localhost.
     Escape character is '^]'.
     ; This is a font server VFLSERVER Version 2.0 Fri Mar 13 11:58:42 JST 1998
       ...

     ; Type `HELP' for description of the protocol.

     (100 "vflserver ready.")

     open1 timR14.pcf
     (100 0 "timR14.pcf")
     debug bitmap on
     (100 "Ascii-art bitmap on.")
     bitmap1 0 0x67
     (100 8 13 0 9 9 0
      "3eccc4c4cc78407c7f83c1e27c"
     "
      89012345678901
      +------------+
     9|            |9
     0| ..@@@@@.   |0
     1| @@..@@..   |1
     2| @@...@..   |2
     3| @@...@..   |3
     4| @@..@@..   |4
     5| .@@@@...   |5
     6| .@......   |6
     7| .@@@@@..   |7
     8| .@@@@@@@   |8
     9| +.....@@ o |9
     0| @@.....@   |0
     1| @@@...@.   |1
     2| .@@@@@..   |2
     3|            |3
      +------------+
      89012345678901
     ")
     quit
     (100 "Happy Hacking")
     Connection closed by foreign host.




File: VFlib-36.info, Node: The protocol of vflserver, Prev: Using vflserver via network, Up: vflserver

The protocol of vflserver
-------------------------


Introduction
............
The VFLSERVER Protocol is a communication protocol between a server
which offers font service and a client which uses fonts.

The character set assumed by this protocol is ASCII character set. A
line is a sequence of character terminated by a newline character and
communication between a server and a client is line-oriented.
     


Reply Format of a Server
........................

Each request to a server by a client takes a form of a line.  The
following are examples of client's requests.

     OPEN1 timR24.pcf
     DEBUG BITMAP ON
     BITMAP1 1 33

A reply by a server to a client is an S-expression, (lisp-like
notation).  The following are examples of server's response.

     (100 0 "timR14.pcf")
     (100 "Ascii-art bitmap on.")
     (100 8 13 0 9 9 0 "3eccc4c4cc78407c7f83c1e27c")

The first number of the response of each reply by a server are formed
by decimal digits and these three digits indicates the status of an
execution of client's request.  Thus, this three digits is a status
code.

The first digit is one of `1', `2', ...., `5'.  If this digit is `1',
it there is no error at all.  If it is `5', there are some errors to
achieve a request.  According to the degree of fatalness, the digit is
decided; It is `1' if no error is detected and is `5' if some fatal
errors are detected and it is impossible to continue to execute a
server.  If it is not `5', a client can receive some result.


The Protocol
............

The following defines commands and their arguments by a client, and
corresponding responses by a server. Command name is case-insensitive,
but arguments are case-sensitive.  In the description of command
format, arguments enclosed by [ ] can be omitted, while arguments that
are not enclosed by [ ] are essential arguments and cannot be omitted.



OPEN1 FONT_NAME [ POINT_SIZE [ MAG_X MAG_Y [ DPI_X DPI_Y ]]]
     Open a font in mode 1 (high resolution device oriented mode).
     This corresponds to `VF_OpenFont1()' function.  If it succeeds
     opening the font, a font identifier is returned.  After a font is
     opened, any request for a font is specified by font identifier
     (not font name).

     Response:
     When the command is successful: ( STATUS FONTID MESSAGE )
              FONTID is a font id represented by non-negative integer
          in decimal.
     When the command failed: ( STATUS MESSAGE )
               STATUS indicates that an error occurred.


OPEN2 FONT_NAME [ PIXEL_SIZE [ MAG_X MAG_Y ]]
     Open a font in mode 2 (low resolution device oriented mode).
     This corresponds to `VF_OpenFont2()' function.  If it succeeds
     opening the font, a font identifier is returned.  After a font is
     opened, any request for a font is specified by font identifier
     (not font name).

     Response: Response is the same as one for `OPEN1' command.


CLOSE FONT_ID
     Closed a font.

     Response: ( STATUS MESSAGE )


BITMAP1 FONT_ID CODE_POINT [ MAG_X MAG_Y ]
     Obtain a bitmap.  FONT_ID is a font id.  This command corresponds
     to `VF_GetBitmap1()' function of VFlib.

     Response:
     When the command is successful: ( STATUS WIDTH HEIGHT OFFX OFFY MVX MVY BITMAP )
          WIDTH and HEIGHT is a size of bitmap in pixels.  BITMAP is
          encoded as a sequence of hexadecimal number.  Eight pixels
          are encoded to two hexadecimal number and the weight of the
          i-th (0 <= i < 8) pixel from the leftmost pixel is 0x80 >>
          i.  BITMAP is a sequence of encoded of rasters; the first
          raster begins from the upper left corner to upper right
          corner.  Then, it is followed by next raster (one pixel down
          from the first raster). One raster is (width+7)/8 bytes, and
          BITMAP contains an encoded bitmap of ((width+7)/8)*height
          bytes.  Thus, the length of BITMAP is
          2*((width+7)/8)*height.
     When the command failed: ( STATUS MESSAGE )
               STATUS indicates that an error occurred.


BITMAP2 FONT_ID CODE_POINT [ PIXEL_SIZE [ MAG_X MAG_Y ]]
     Obtain a bitmap. This command corresponds to `VF_GetBitmap2()'
     function.  Response is the same as `BITMAP1' command.


METRIC1 FONT_ID CODE_POINT [ POINT_SIZE [ MAG_X MAG_Y ]]
     Obtain a metric information of a font.  This command corresponds
     to `VF_GetMetric1()' function.

     Response:
     When the command is successful: ( STATUS WIDTH HEIGHT OFFX OFFY MVX MVY )
          Each element of the response is the same as return values
          for `BITMAP1' command except for their units are points.
     When the command failed: ( STATUS MESSAGE )
               STATUS indicates that an error occurred.


METRIC2 FONT_ID CODE_POINT [ PIXEL_SIZE [ MAG_X MAG_Y ]]
     Obtain a metric information of a font.  This command corresponds
     to `VF_GetMetric2()' function.

     Response: Same as METRIC1 command except for units are points.


FONTBBX1 FONT_ID [ MAG_X MAG_Y ]
     Obtain font bounding information of a given font FONT_ID opened
     in mode 1.  The argument MAG_X MAG_Y are magnification factor to
     be scaled.  This command corresponds to
     `VF_GetFontBoundingBox1()' function.

     Response:
     When the command is successful: ( STATUS WIDTH HEIGHT XOFF YOFF )
          WIDTH and HEIGHT are width and height of bounding box,
          respectively.  XOFF and YOFF are the largest horizontal and
          vertical displacement of lower left corner of bounding box
          from reference points.  Note that these values does not
          guarantee the minimality; they only guarantee that all
          characters can be contained in a box described by them.
          Units of return values are point.

     When the command failed: ( STATUS MESSAGE )
               STATUS indicates that an error occurred.


FONTBBX2 FONT_ID [ MAG_X MAG_Y ]
     Arguments and return values are the same except FONT_ID must be
     in mode 2 and units of return values are pixel.


PROPERTY FONT_ID PROPERTY_NAME
     Obtain a property named PROPERTY_NAME of a font FONT_ID.
     @noindent

     Response:
     When the command is successful: ( STATUS VALUE )
     When the command failed: ( STATUS MESSAGE )
               STATUS indicates that an error occurred.


MINIMIZE-BBX [ FLAG ]
     Select a mode whether a bitmap sent from a server should be
     minimized or not. If FLAG is `ON', bounding boxes of bitmaps sent
     from a server is minimized not to contain white pixels as
     possible.  If FLAG is `OFF', bitmaps sent from a server is not
     guaranteed to be minimized bounding boxes.  If FLAG is not given,
     current mode is returned.  Initial mode is `OFF'.

     Response: The current mode is returned even if the operation
     fails or succeeds.
     When the command is successful: ( STATUS-CODE MODE )
                MODE is one of `ON' or `OFF'.
     When the command failed: ( STATUS-CODE MODE )
                MODE is one of `ON' or `OFF'.


QUIT
     Finish interaction between a server and a client.  This operation
     always succeeds.

     Response: ( STATUS MESSAGE )






File: VFlib-36.info, Node: vfltest, Next: vflx11, Prev: vflserver, Up: Sample programs

vfltest
=======


`vfltest' displays glyph of a given font and characters by ASCII-art
form on a character terminal.  It does not requires X Window System,
but the font of the terminal must be a fixed-width font, since bitmaps
are printed by ASCII-art form.

Usage: vfltest [ OPTIONS... ] FONT_NAME CHAR_LIST

Options:

-mode1
     A font is opened in mode 1 (high resolution device oriented
     mode).

-mode2
     A font is opened in mode 2 (low resolution device oriented mode).

-ol
     Bitmaps are obtained by `VF_GetOutline()' and then
     `VF_OutlineToBitmap()'.  This option is effective only when a
     font is opened in mode 1.

-v VFLIBCAP
     A file name of vflibcap to be used. If this option is not given,
     default vflibcap file is used. (Possibly, default vflibcap is
     `/usr/local/share/VFlib/3.6.14/vflibcap'.)
  
-p POINT or -p PIXEL
     Specify point or pixel size of characters.  If this option is not
     given, size of characters are original size of a font.

-d DPI
     Give a device resolution in DPI.  This option is effective only
     when a font is opened in mode 1.

-m MAG
     Specify vertical and horizontal magnification factor.  If this
     option is not given, magnification factor is 1.0.

-mx MAG_H
     Specify horizontal magnification factor.  If this option is not
     given, horizontal magnification factor is 1.0.

-my MAG_V
     Specify vertical magnification factor.  If this option is not
     given, vertical magnification factor is 1.0.

--help
     Print command line arguments and key operations on a window.


A list of character is a sequence of the following forms.


CODE
     A character is given by character code.  Decimal (e.g., `34') and
     Hexa-decimal (e.g., `0x67') numbers can be used.

FROM - TO
     This form specifies characters by a range of character code, from
     FROM to TO (e.g., `0x20 - 0x7e').  Space characters are necessary
     before and after minus sign (`-').

=CHARLIST
     This form specifies characters by a list of 1-byte characters,
     e.g., `=abcdefg'.





