~ubuntu-branches/ubuntu/precise/vflib3/precise

« back to all changes in this revision

Viewing changes to doc/VFlib-36.info-4

  • Committer: Bazaar Package Importer
  • Author(s): Masayuki Hatta
  • Date: 2002-04-15 12:10:24 UTC
  • Revision ID: james.westby@ubuntu.com-20020415121024-cann32wucyfbq22f
Tags: upstream-3.6.12
ImportĀ upstreamĀ versionĀ 3.6.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Info file: VFlib-36.info,    -*-Text-*-
 
2
produced by `texinfo-format-buffer'
 
3
from file `VFlib-36.texi'
 
4
using `texinfmt.el' version 2.38 of 3 July 1998.
 
5
 
 
6
 
 
7
 
 
8
 
 
9
 
 
10
 
 
11
 
 
12
 
 
13
 
 
14
 
 
15
File: VFlib-36.info, Node: Example vflibcap 2, Next: Example vflibcap 3, Prev: Example vflibcap 1, Up: Writing a vflibcap
 
16
 
 
17
Example vflibcap 2
 
18
==================
 
19
 
 
20
This vflibcap file is an example for TeX DVI drivers.  This vflibcap
 
21
file provides a set of fonts of the form `NAME.DVIpk' and `NAME.pk'.
 
22
For example, `cmr10.300pk' and `cmr10.pk'.
 
23
 
 
24
For Japanese Kanji character fonts `min5' ... `min10', `goth5'
 
25
... `goth10', `tmin5' .. `tmin10', `tgoth5' ... `tgoth10', X Window PCF
 
26
format font `jiskan24.pcf' is used via `ascii-jtex-kanji' font driver.
 
27
 
 
28
Other fonts are solved in PK and GF format fonts.  If a font is not
 
29
available in these formats, a TFM font is used to produce a "black" box.
 
30
(TFM files are metrics files and do not conatin glyph.  But TFM driver
 
31
in VFlib produces a "box" glyph as it ware font files.)
 
32
 
 
33
Parameters of device resolution and magnification factor for the
 
34
function `VF_OpenFont1()' determines the font size and font metrics to
 
35
be opened.
 
36
 
 
37
To use VFlib with this vflibcap file, I recommend to open font by
 
38
`VF_OpenFont1(NAME.pk, DPI, DPI, -1, MAG, MAG)', where `NAME.pk' is a
 
39
font name (e.g., `cmr10.pk'), DPI is the device resolution in dpi (e.g.,
 
40
`300'), and MAG is the magnification factor (e.g., `1.2' for magstep 1
 
41
fonts).
 
42
 
 
43
     ;; -----------------------------------------------------------------
 
44
     ;;   VFlib Default
 
45
     ;; -----------------------------------------------------------------
 
46
     (define-default VFlib
 
47
       (extension-hints  ("pk" TeX))
 
48
       (implicit-font-classes)
 
49
       (uncompression-programs  (".Z" "zcat") (".gz" "gzip -cd"))
 
50
       (variable-values  (TeX_USE_KPATHSEA      "Yes")
 
51
                         (TeX_DPI               "300")  ;; or "600"
 
52
                         (TeX_KPATHSEA_MODE     "cx")   ;; or "ljfour"
 
53
                         (TeX_KPATHSEA_PROGRAM  "/usr/local/bin/xldvi"))
 
54
       (use-kpathsea           $TeX_USE_KPATHSEA)
 
55
       (kpathsea-mode          $TeX_KPATHSEA_MODE)
 
56
       (kpathsea-program-name  $TeX_KPATHSEA_PROGRAM)
 
57
       (code-conversion-files  
 
58
        "iso8859-1_unicode.ccv" "iso8859-2_unicode.ccv" "iso8859-3_unicode.ccv"
 
59
        "iso8859-4_unicode.ccv" "iso8859-5_unicode.ccv" "iso8859-6_unicode.ccv"
 
60
        "iso8859-7_unicode.ccv" "iso8859-8_unicode.ccv" "iso8859-9_unicode.ccv"
 
61
        "jisx0201_unicode.ccv" "jisx0208_unicode.ccv" "jisx0212_unicode.ccv"
 
62
        "ksc5601_unicode.ccv"
 
63
        "gb12345_unicode.ccv" "gb2312_unicode.ccv"
 
64
        "big5_unicode.ccv" "cns11643_unicode.ccv"
 
65
        "iso8859-5_koi8-r.ccv" "koi8-r_iso8859-5.ccv" "koi8-r_unicode.ccv"))
 
66
 
 
67
     ;; -----------------------------------------------------------------
 
68
     ;;   TeX-related Font Class Default and TeX Font Mapper
 
69
     ;; -----------------------------------------------------------------
 
70
     (define-default  TeX
 
71
       (tfm-directories  "TEXMF")
 
72
       (tfm-filename-extensions  ".tfm")
 
73
       (font-mapping
 
74
        ((ascii-jtex-kanji "%f.jtex")  "min*" "goth*" "tmin*" "tgoth*")
 
75
        ((pk "%f.%dpk") (gf "%f.%dgf")  *)
 
76
        ((tfm "%f.%dtfm") *))
 
77
       (resolution-accuracy 0.02)
 
78
       (resolution-corrections
 
79
        (240  ;; sparcptr
 
80
         240  263  288  312  346  415  498  597)
 
81
        (300  ;; cx
 
82
         300  329  360  432  518  622  746  896 1075 1290  240 270)
 
83
        (400  ;; sparcptr
 
84
         400  438  480  576  691  829  995 1194 1433 1720  320 360)
 
85
        (600  ;; ljfour
 
86
         600  657  720  864 1037 1244 1493 1792 2150 2580  480 540))
 
87
       (dpi $TeX_DPI))
 
88
 
 
89
     ;; -----------------------------------------------------------------
 
90
     ;;   GF Font Class Default
 
91
     ;; -----------------------------------------------------------------
 
92
     (define-default gf
 
93
       (font-directories  "TEXMF"))
 
94
 
 
95
     ;; -----------------------------------------------------------------
 
96
     ;;   PK Font Class Default
 
97
     ;; -----------------------------------------------------------------
 
98
     (define-default pk
 
99
       (font-directories  "TEXMF"))
 
100
 
 
101
     ;; -----------------------------------------------------------------
 
102
     ;;   VF Font Class Default
 
103
     ;; -----------------------------------------------------------------
 
104
     (define-default vf
 
105
       (font-directories  "TEXMF")
 
106
       (font-mapping
 
107
        ((type1 "%f.pfb" point-size-from-tfm)  *) )
 
108
       (open-style "try")     ;; "none", "try", or "require"
 
109
       (glyph-style "fill"))  ;; "fill", or "empty"
 
110
 
 
111
     ;; -----------------------------------------------------------------
 
112
     ;;   TFM Font Class Default
 
113
     ;; -----------------------------------------------------------------
 
114
     (define-default tfm
 
115
       (glyph-style  "fill"))
 
116
 
 
117
     ;; -----------------------------------------------------------------
 
118
     ;;   ASCII-JTeX Kanji fonts
 
119
     ;; -----------------------------------------------------------------
 
120
     (define-default  ascii-jtex-kanji
 
121
       (tfm-directories  "TEXMF")
 
122
       (implicit-font-mapping-suffix ".jtex"))
 
123
 
 
124
     ;; -----------------------------------------------------------------
 
125
     ;; Type1 Font Class Default
 
126
     ;; -----------------------------------------------------------------
 
127
     (define-default type1
 
128
       (font-directories  "TEXMF")
 
129
       (afm-directories   "TEXMF")
 
130
       (log-level "none")
 
131
       (dpi $TeX_DPI))
 
132
 
 
133
     ;; -----------------------------------------------------------------
 
134
     ;; TrueType Font Class Default
 
135
     ;; -----------------------------------------------------------------
 
136
     (define-default truetype
 
137
       (font-directories  "TEXMF")
 
138
       (platform-id "microsoft")
 
139
       (dpi $TeX_DPI))
 
140
  
 
141
     ;; -----------------------------------------------------------------
 
142
     ;;   PCF Font Class Default
 
143
     ;; -----------------------------------------------------------------
 
144
     (define-default  pcf
 
145
       (font-directories  "/usr/X11R6/lib/X11/fonts//"
 
146
                          "/usr/local/X11R6/lib/X11/fonts//"
 
147
                          "/usr/openwin/lib/X11/fonts//"
 
148
                          "/usr/X386/lib/X11/fonts//"
 
149
                          "/usr/XFree86/lib/X11/fonts//"
 
150
                          "/usr/X11/lib/X11/fonts//"
 
151
                          "/usr/local/lib/X11/fonts//"
 
152
                          "/usr/X11R5/lib/X11/fonts//"
 
153
                          "/usr/local/X11R5/lib/X11/fonts//"
 
154
                          "/usr/local/share/fonts/X11//")
 
155
       (compression-extensions ".gz" ".Z")
 
156
       (dpi $TeX_DPI))
 
157
 
 
158
 
 
159
     ;; -----------------------------------------------------------------
 
160
     ;;  Japanese Kanji fonts using standard X11 PCF fonts
 
161
     (define-font jtex-min    (font-class pcf) (font-file "jiskan24.pcf"))
 
162
     (define-font jtex-goth   (font-class pcf) (font-file "jiskan24.pcf"))
 
163
     (define-font jtex-tmin   (font-class pcf) (font-file "jiskan24.pcf"))
 
164
     (define-font jtex-tgoth  (font-class pcf) (font-file "jiskan24.pcf"))
 
165
 
 
166
     (define-macro min-common
 
167
       (font-class ascii-jtex-kanji) (kanji-font jtex-min)
 
168
       (kanji-font-magnification 0.85) (metric-adjustment-file "jiskan24.adj"))
 
169
     (define-macro goth-common
 
170
       (font-class ascii-jtex-kanji) (kanji-font jtex-goth)
 
171
       (kanji-font-magnification 0.85) (metric-adjustment-file "jiskan24.adj"))
 
172
     (define-macro tmin-common
 
173
       (font-class ascii-jtex-kanji) (kanji-font jtex-tmin)
 
174
       (kanji-font-magnification 0.85) (metric-adjustment-file "jiskan24v.adj"))
 
175
     (define-macro tgoth-common
 
176
       (font-class ascii-jtex-kanji) (kanji-font jtex-tgoth)
 
177
       (kanji-font-magnification 0.85) (metric-adjustment-file "jiskan24v.adj"))
 
178
 
 
179
     (define-font min5.jtex     (kanji-font-point-size  5)  min-common)
 
180
     (define-font min6.jtex     (kanji-font-point-size  6)  min-common)
 
181
     (define-font min7.jtex     (kanji-font-point-size  7)  min-common)
 
182
     (define-font min8.jtex     (kanji-font-point-size  8)  min-common)
 
183
     (define-font min9.jtex     (kanji-font-point-size  9)  min-common)
 
184
     (define-font min10.jtex    (kanji-font-point-size 10)  min-common)
 
185
     (define-font goth5.jtex    (kanji-font-point-size  5)  goth-common)
 
186
     (define-font goth6.jtex    (kanji-font-point-size  6)  goth-common)
 
187
     (define-font goth7.jtex    (kanji-font-point-size  7)  goth-common)
 
188
     (define-font goth8.jtex    (kanji-font-point-size  8)  goth-common)
 
189
     (define-font goth9.jtex    (kanji-font-point-size  9)  goth-common)
 
190
     (define-font goth10.jtex   (kanji-font-point-size 10)  goth-common)
 
191
     (define-font tmin5.jtex    (kanji-font-point-size  5)  tmin-common)
 
192
     (define-font tmin6.jtex    (kanji-font-point-size  6)  tmin-common)
 
193
     (define-font tmin7.jtex    (kanji-font-point-size  7)  tmin-common)
 
194
     (define-font tmin8.jtex    (kanji-font-point-size  8)  tmin-common)
 
195
     (define-font tmin9.jtex    (kanji-font-point-size  9)  tmin-common)
 
196
     (define-font tmin10.jtex   (kanji-font-point-size 10)  tmin-common)
 
197
     (define-font tgoth5.jtex   (kanji-font-point-size  5)  tgoth-common)
 
198
     (define-font tgoth6.jtex   (kanji-font-point-size  6)  tgoth-common)
 
199
     (define-font tgoth7.jtex   (kanji-font-point-size  7)  tgoth-common)
 
200
     (define-font tgoth8.jtex   (kanji-font-point-size  8)  tgoth-common)
 
201
     (define-font tgoth9.jtex   (kanji-font-point-size  9)  tgoth-common)
 
202
     (define-font tgoth10.jtex  (kanji-font-point-size 10)  tgoth-common)
 
203
     ;; -----------------------------------------------------------------
 
204
     ;; EOF
 
205
 
 
206
 
 
207
 
 
208
 
 
209
File: VFlib-36.info, Node: Example vflibcap 3, Prev: Example vflibcap 2, Up: Writing a vflibcap
 
210
 
 
211
Example vflibcap 3
 
212
==================
 
213
 
 
214
This is an example for TeX DVI drivers.  This vflibcap desgnates VFlib
 
215
to use PK files.  For missing PK files, black "boxes" by TFM fonts are
 
216
used as substitutes of glyphs of PK files
 
217
 
 
218
     ;; -----------------------------------------------------------------
 
219
     ;;   VFlib Default
 
220
     ;; -----------------------------------------------------------------
 
221
     (define-default VFlib
 
222
       (extension-hints  ("pk" TeX) ("gf" TeX))
 
223
       (implicit-font-classes)
 
224
       (uncompression-programs  (".Z" "zcat") (".gz" "gzip -cd"))
 
225
       (variable-values  (TeX_USE_KPATHSEA      "Yes")
 
226
                         (TeX_DPI               "300")  ;; or "600"
 
227
                         (TeX_KPATHSEA_MODE     "cx")   ;; or "ljfour"
 
228
                         (TeX_KPATHSEA_PROGRAM  "/usr/local/bin/xldvi"))
 
229
       (use-kpathsea           $TeX_USE_KPATHSEA)
 
230
       (kpathsea-mode          $TeX_KPATHSEA_MODE)
 
231
       (kpathsea-program-name  $TeX_KPATHSEA_PROGRAM))
 
232
 
 
233
     ;; -----------------------------------------------------------------
 
234
     ;;   TeX-related Font Class Default and TeX Font Mapper
 
235
     ;; -----------------------------------------------------------------
 
236
     (define-default  TeX
 
237
       (tfm-directories  "TEXMF"
 
238
                         "/usr/local/lib/jtex/fonts"
 
239
                         "/usr/local/lib/tex/fonts")
 
240
       (tfm-filename-extensions  ".tfm")
 
241
       (font-mapping
 
242
        ((pk "%f.%dpk") *)
 
243
        ((tfm "%f.%dtfm") *))
 
244
       (resolution-accuracy 0.02)
 
245
       (resolution-corrections
 
246
        (240  ;; sparcptr
 
247
         240  263  288  312  346  415  498  597)
 
248
        (300  ;; cx
 
249
         300  329  360  432  518  622  746  896 1075 1290  240 270)
 
250
        (400  ;; sparcptr
 
251
         400  438  480  576  691  829  995 1194 1433 1720  320 360)
 
252
        (600  ;; ljfour
 
253
         600  657  720  864 1037 1244 1493 1792 2150 2580  480 540))
 
254
       (dpi $TeX_DPI))
 
255
 
 
256
     ;; -----------------------------------------------------------------
 
257
     ;;   PK Font Class Default
 
258
     ;; -----------------------------------------------------------------
 
259
     (define-default pk
 
260
       (font-directories "TEXMF"))
 
261
 
 
262
     ;; -----------------------------------------------------------------
 
263
     ;;   TFM Font Class Default
 
264
     ;; -----------------------------------------------------------------
 
265
     (define-default tfm
 
266
       (glyph-style  "fill"))
 
267
 
 
268
     ;; -----------------------------------------------------------------
 
269
     ;EOF
 
270
 
 
271
 
 
272
 
 
273
 
 
274
 
 
275
 
 
276
File: VFlib-36.info, Node: Debugging a vflibcap, Next: Code conversion system, Prev: Writing a vflibcap, Up: Top
 
277
 
 
278
Debugging a vflibcap
 
279
********************
 
280
 
 
281
There is no utility programs that checks syntax of a vflibcap file.  But
 
282
VFlib checks syntax of vflibcap file when a font driver is initialized
 
283
or a font is opened.
 
284
 
 
285
VFlib prints a message to inform a user if syntax is illegal, undefined
 
286
capability is used (this may be a typographical error), essential
 
287
capability is missing, an undefined macro is used, or forms of
 
288
capability values are illegal.
 
289
 
 
290
The following Unix environment variables are used to print debugging
 
291
messages.
 
292
 
 
293
`VFLIB_DEBUG_FONT_OPEN'
 
294
       -- If this environment variable is defined, the processes of font
 
295
     opens are printed.
 
296
 
 
297
`VFLIB_DEBUG_FONT_SEARCH'
 
298
       -- If this variable is defined, the processes of font opens are
 
299
     printed
 
300
 
 
301
`VFLIB_DEBUG_VFLIBCAP'
 
302
       -- If this variable is defined, the process of reading of
 
303
     vflibcap file is printed.
 
304
 
 
305
`VFLIB_DEBUG_PARAMETERS'
 
306
       -- If this variable is defined, VFlib prints how parameters
 
307
     (variables) in vflibcap file are substituted.
 
308
 
 
309
`VFLIB_DEBUG_CCV'
 
310
       -- If this variable is defined, the process of reading CCV files
 
311
     is printed.
 
312
 
 
313
`VFLIB_DEBUG_CCV_MAPPING'
 
314
       -- If this variable is defined, encoding conversions by CCV are
 
315
     printed.
 
316
 
 
317
 
 
318
 
 
319
 
 
320
 
 
321
 
 
322
 
 
323
 
 
324
File: VFlib-36.info, Node: Code conversion system, Next: Utility programs, Prev: Debugging a vflibcap, Up: Top
 
325
 
 
326
Code conversion system
 
327
**********************
 
328
 
 
329
 
 
330
Code conversion system (CCV) is used to convert from a character set and
 
331
an encoding to another.  For example, a font of Unicode character set
 
332
and Unicode encoding can be accessed as ISO 8859-2 character set of ISO
 
333
encoding by encoding conversion.  TrueType font class makes use of this
 
334
feature to hide invisible internal font encoding scheme and provides
 
335
desired external view to users.
 
336
 
 
337
Conversion rule is given by one of the following two methods
 
338
   * Internal functions in VFlib (written in C) These functions are
 
339
     hardcoded and new conversions rules cannot be added without
 
340
     modifying source code.
 
341
   * External files, called CCV files.  A list of CCV files to be used
 
342
     is specified in `code-conversion-files' capability of `VFlib'
 
343
     default.
 
344
 
 
345
 
 
346
 
 
347
How CCV works
 
348
=============
 
349
 
 
350
Each conversion rule has the following information.
 
351
 
 
352
   * EXTERNAL charset name
 
353
   * EXTERNAL encoding name
 
354
   * INTERNAL charset name
 
355
   * INTERNAL encoding name
 
356
   * other info such as format and size of conversion table... 
 
357
 
 
358
On invocation of VFlib, these information is read from each CCV files.
 
359
(CCV files are not fully loaded at initialization of VFlib; VFlib just
 
360
checks relation of conversion.  Conversion tables, which can be large,
 
361
are loaded on demand.)  In addition, when VFlib is initialized, internal
 
362
CCV functions are installed and these information is given for each
 
363
conversion function.
 
364
 
 
365
"EXTERNAL" means external view (i.e., user side encoding) and "INTERNAL"
 
366
means internal view (i.e., font encoding).  Users can define arbitrary
 
367
charset and encoding names, except that some font driver may predefined
 
368
names for internal use.  (TrueType font driver uses some predefined
 
369
names, such as "unicode".)
 
370
 
 
371
CCV system has a conversion table searching mechanism.  Table is
 
372
searched by source charset/encoding names and destination
 
373
charset/encoding names.  If there is a CCV file listed in
 
374
`code_conversion_files' capability of `VFlib' defaults entry in vflibcap
 
375
that matches charset and encoding name, the CCV file is dynamically
 
376
loaded and used for code conversion.
 
377
 
 
378
For example, a CCV file iso8859-1_unicode.ccv has the following
 
379
charset/encoding names:
 
380
 
 
381
   * EXTERNAL charset name:      ISO8859-1
 
382
   * EXTERNAL charset encoding:  ISO
 
383
   * INTERNAL charset name:      UNICODE
 
384
   * INTERNAL charset encoding:  UNICODE
 
385
 
 
386
By this CCV file, a unicode font can be viewed as a ISO encoding of ISO
 
387
8859-1 charset. (It is very important to note that names are just
 
388
symbols and not have any meaning; in the above example, conversion to
 
389
ISO encoding is implemented by conversion table body in CCV file.)
 
390
 
 
391
In the current implementation, BDF, PCF, HBF, and TrueType font drivers
 
392
use CCV system.  In the following, how TrueType font driver uses CCV is
 
393
described.
 
394
 
 
395
Each TrueType font has information about charset name and encoding name
 
396
of the font.  When a font entry is defined in vflibcap file and
 
397
`encoding' and `character-set' capability is defined, say, E and C
 
398
respectively. According to internal charset and encoding information of
 
399
TrueType font, the driver searches a CCV table, when the VFlib font is
 
400
opened, that matches the following conversion relation.
 
401
 
 
402
   * EXTERNAL charset name:      E
 
403
   * EXTERNAL charset encoding:  C
 
404
   * INTERNAL charset name:      possibly, UNICODE (from font file info)
 
405
   * INTERNAL charset encoding:  possibly, UNICODE (from font file info)
 
406
 
 
407
If not found, conversion is impossible. If found, a CCV file found is
 
408
used.  After a font is opened, CCV table is used for converting code
 
409
points for VFlib operation such as `VF_GetBitmap1()'.
 
410
 
 
411
 
 
412
 
 
413
The internal (hardcoded) CCV functions
 
414
======================================
 
415
VFlib has several hardcoded CCV functions.  Followings CCV functions are
 
416
implemented.
 
417
 
 
418
 
 
419
   * from ISO-2022 (`ISO2022') to Shift JIS (`SJIS')
 
420
 
 
421
   * from Shift JIS (`SJIS') to ISO 2022 (`ISO2022')
 
422
 
 
423
   * from EUC (`EUC') to ISO 2022 (`ISO2022')
 
424
 
 
425
   * from Row-Cell (`Row-Cell') to ISO 2022 (`ISO2022')
 
426
 
 
427
   * from ISO-2022 (`ISO2022') to Row-Cell (`Row-Cell')
 
428
 
 
429
   * from ISO-2022 (`ISO2022') to WanSung (`WanSung')
 
430
 
 
431
   * from Row-Cell (`Row-Cell') to WanSung (`WanSung')
 
432
 
 
433
   * from ISO-2022 (`ISO2022') to Sequential Numbering (`Sequential2-0'
 
434
     and `Sequential2-1')
 
435
 
 
436
     By these encoding schemes, characters are numbered sequentially
 
437
     starting from 0 (`Sequential2-0') or 1 (`Sequential2-1').  That is,
 
438
     `Sequential2-0' encoding is an encoding such that code of the first
 
439
     character is 0, code of the second is 1, ..., and code of the i-th
 
440
     character is (i-1).  `Sequential2-1' encoding is an encoding such
 
441
     that code of the first character is 1, code of the second is 2,
 
442
     ..., and code of the i-th is (i).  External code point must be
 
443
     encoded two-byte, i.e., 0x2121...7e7e.  These values are converted
 
444
     to 0...8835 or 1...8836.
 
445
 
 
446
 
 
447
Encoding name `JIS' is defined as an alias of `ISO2022'.  Encoding name
 
448
`Ku-Ten' is defined as an alias of `Row-Cell'.  Note that these aliases
 
449
are defined only for hardcorded CCV functions.
 
450
 
 
451
All of these are implemented simple arithmetic and large conversion
 
452
tables are not necessary in memory.
 
453
 
 
454
 
 
455
 
 
456
The syntax of CCV files
 
457
=======================
 
458
 
 
459
The syntax of CCV files is lisp-like notation, similar to vflibcap
 
460
files.  The CCV file defines its own directive set, explained below.  A
 
461
code conversion table is divided in several sub-tables to reduce the
 
462
file size (and memory size when the file is loaded into memory).  The
 
463
sub-tables are called `blocks'.
 
464
 
 
465
`(charset-external-name FROM-CS-NAME)'
 
466
`(charset-external-encoding FROM-CS-ENC)'
 
467
`(charset-internal-name TO-CS-NAME)'
 
468
`(charset-internal-encoding TO-CS-ENC)'
 
469
     --- These four directives describes character set and encoding information 
 
470
     of conversion.
 
471
 
 
472
`(table-type TYPE)'
 
473
     TYPE must be one of the following:
 
474
        `array'
 
475
        `random-arrays'
 
476
 
 
477
`(c1-min C1MIN)'
 
478
`(c1-max C1MAX)'
 
479
`(c2-min C2MIN)'
 
480
`(c2-max C2MAX)'
 
481
`(block-size SIZE)'
 
482
`(nblocks NBLOCKS)'
 
483
`(block BLOCK CODE0 CODE1 ...)'
 
484
 
 
485
Let C be a code point of a character to be converted by this CCV file.
 
486
 
 
487
It is converted as follows.  Let C1 be C/SIZE and C2 be C modulo SIZE.
 
488
The block number B that should be referred to is C1-C1MIN.  The position
 
489
I in the block B is C2-C2MIN.  Thus, the value of I-th entry of a block
 
490
numbered B is converted code point.
 
491
 
 
492
C1MAX, C2MAX and NBLOCKS are used internally to determine the necessary
 
493
memory area to load the table.
 
494
 
 
495
Theoretically, `array' is enough for the value for `table-type'
 
496
directive.  But in case that there are many blocks that do not have
 
497
conversion entries.  This is happen in the case of CNS11643 character
 
498
set (a Hanji character set in Taiwan).  To reduce the table size, some
 
499
of blocks can be omitted by giving `random-array' for `table-type'
 
500
directive.
 
501
 
 
502
In case of `array', lookup for code conversion is implemented by
 
503
indexing an entire array, which is very fast.  In case of
 
504
`random-array', lookup for code conversion takes time to find a
 
505
corresponding sub-table (block), since the table is not linear.
 
506
 
 
507
 
 
508
 
 
509
 
 
510
Example of a CCV file 1
 
511
=======================
 
512
 
 
513
The following example is a CCV file that virtually provides a ISO 8859-1
 
514
character set font using a Unicode font.  That is, a Unicode font can be
 
515
used as if it were a ISO 8859-1 font by the CCV file.  This file is
 
516
distributed with VFlib and installed by the name
 
517
`iso8859-1_unicode.ccv'.
 
518
 
 
519
This file is a table indexed by code points of ISO 8859-1; contents of
 
520
table entries are Unicode code points.
 
521
 
 
522
 
 
523
     ; Conversion table: ISO8859-1 ==> UNICODE
 
524
     (charset-external-name ISO8859-1)
 
525
     (charset-external-encoding ISO)
 
526
     (charset-internal-name UNICODE)
 
527
     (charset-internal-encoding UNICODE)
 
528
     (table-type array)
 
529
     ; Code point C is converted to C' by the following formula:
 
530
     ;   C' = Table[(c1 - c1min)*M + (c2 - c2min)],
 
531
     ;   where c1 = C/B and c2 = C%B, and M = c2max - c2min + 1.
 
532
     ;   B is a block size given by the 'block-size:' parameter.
 
533
     (c1-min 0x0)
 
534
     (c1-max 0x0)
 
535
     (c2-min 0x20)
 
536
     (c2-max 0xff)
 
537
     (block-size 256)
 
538
     (nblocks 1)
 
539
     ; 0x0020 ... 0x00ff
 
540
     (block 0
 
541
         0x0020 0x0021 0x0022 0x0023 0x0024 0x0025 0x0026 0x0027 
 
542
         0x0028 0x0029 0x002a 0x002b 0x002c 0x002d 0x002e 0x002f 
 
543
         0x0030 0x0031 0x0032 0x0033 0x0034 0x0035 0x0036 0x0037 
 
544
         0x0038 0x0039 0x003a 0x003b 0x003c 0x003d 0x003e 0x003f 
 
545
         0x0040 0x0041 0x0042 0x0043 0x0044 0x0045 0x0046 0x0047 
 
546
         0x0048 0x0049 0x004a 0x004b 0x004c 0x004d 0x004e 0x004f 
 
547
         0x0050 0x0051 0x0052 0x0053 0x0054 0x0055 0x0056 0x0057 
 
548
         0x0058 0x0059 0x005a 0x005b 0x005c 0x005d 0x005e 0x005f 
 
549
         0x0060 0x0061 0x0062 0x0063 0x0064 0x0065 0x0066 0x0067 
 
550
         0x0068 0x0069 0x006a 0x006b 0x006c 0x006d 0x006e 0x006f 
 
551
         0x0070 0x0071 0x0072 0x0073 0x0074 0x0075 0x0076 0x0077 
 
552
         0x0078 0x0079 0x007a 0x007b 0x007c 0x007d 0x007e -1     
 
553
         -1     -1     -1     -1     -1     -1     -1     -1     
 
554
         -1     -1     -1     -1     -1     -1     -1     -1     
 
555
         -1     -1     -1     -1     -1     -1     -1     -1     
 
556
         -1     -1     -1     -1     -1     -1     -1     -1     
 
557
         0x00a0 0x00a1 0x00a2 0x00a3 0x00a4 0x00a5 0x00a6 0x00a7 
 
558
         0x00a8 0x00a9 0x00aa 0x00ab 0x00ac 0x00ad 0x00ae 0x00af 
 
559
         0x00b0 0x00b1 0x00b2 0x00b3 0x00b4 0x00b5 0x00b6 0x00b7 
 
560
         0x00b8 0x00b9 0x00ba 0x00bb 0x00bc 0x00bd 0x00be 0x00bf 
 
561
         0x00c0 0x00c1 0x00c2 0x00c3 0x00c4 0x00c5 0x00c6 0x00c7 
 
562
         0x00c8 0x00c9 0x00ca 0x00cb 0x00cc 0x00cd 0x00ce 0x00cf 
 
563
         0x00d0 0x00d1 0x00d2 0x00d3 0x00d4 0x00d5 0x00d6 0x00d7 
 
564
         0x00d8 0x00d9 0x00da 0x00db 0x00dc 0x00dd 0x00de 0x00df 
 
565
         0x00e0 0x00e1 0x00e2 0x00e3 0x00e4 0x00e5 0x00e6 0x00e7 
 
566
         0x00e8 0x00e9 0x00ea 0x00eb 0x00ec 0x00ed 0x00ee 0x00ef 
 
567
         0x00f0 0x00f1 0x00f2 0x00f3 0x00f4 0x00f5 0x00f6 0x00f7 
 
568
         0x00f8 0x00f9 0x00fa 0x00fb 0x00fc 0x00fd 0x00fe 0x00ff )
 
569
 
 
570
 
 
571
 
 
572
Example of a CCV file 2
 
573
=======================
 
574
 
 
575
The following example is a CCV file that virtually provides a CNS 11643
 
576
Plane 1 character set font using a Unicode font.  This file is
 
577
distributed with VFlib and installed by the name
 
578
`cns11643-1_unicode.ccv'.
 
579
 
 
580
This file is an example of CCV files that have `random-arrays' for
 
581
`table-type' directive.
 
582
 
 
583
     ; Conversion table: CNS11643-1 ==> UNICODE
 
584
     (charset-external-name CNS11643-1)
 
585
     (charset-external-encoding ISO2022)
 
586
     (charset-internal-name UNICODE)
 
587
     (charset-internal-encoding UNICODE)
 
588
     (table-type random-arrays)
 
589
     ; Code point C is converted to C' by the following formula:
 
590
     ;   C' = Table[(c1 - c1min)*M + (c2 - c2min)],
 
591
     ;   where c1 = C/B and c2 = C%B, and M = c2max - c2min + 1.
 
592
     ;   B is a block size given by the 'block-size:' parameter.
 
593
     (c1-min 0x121)
 
594
     (c1-max 0xe67)
 
595
     (c2-min 0x21)
 
596
     (c2-max 0x7e)
 
597
     (block-size 256)
 
598
     (nblocks 218)
 
599
     ; 0x12121 ... 0x1217e
 
600
     (block 0
 
601
         0x3000 0xff0c 0x3001 0x3002 0xff0e 0x30fb 0xff1b 0xff1a 
 
602
         0xff1f 0xff01 0xfe30 0x2026 0x2025 0xfe50 0xfe51 0xfe52 
 
603
         0x00b7 0xfe54 0xfe55 0xfe56 0xfe57 0xfe31 0x2014 0xfe32 
 
604
         0x2013 -1     -1     -1     -1     0xff08 0xff09 0xfe35 
 
605
         0xfe36 0xff5b 0xff5d 0xfe37 0xfe38 0x3014 0x3015 0xfe39 
 
606
         0xfe3a 0x3010 0x3011 0xfe3b 0xfe3c 0x300a 0x300b 0xfe3d 
 
607
         0xfe3e 0x3008 0x3009 0xfe3f 0xfe40 0x300c 0x300d 0xfe41 
 
608
         0xfe42 0x300e 0x300f 0xfe43 0xfe44 0xfe59 0xfe5a 0xfe5b 
 
609
         0xfe5c 0xfe5d 0xfe5e 0x2018 0x2019 0x201c 0x201d 0x301d 
 
610
         0x301e 0x2032 0x2035 0xff03 0xff06 0xff0a 0x203b 0x00a7 
 
611
         0x3003 0x25cb 0x25cf 0x25b3 0x25b2 0x25ce 0x2606 0x2605 
 
612
         0x25c7 0x25c6 0x25a1 0x25a0 0x25bd 0x25bc )
 
613
     ; 0x12221 ... 0x1227e
 
614
     (block 1
 
615
         0x32a3 0x2105 0x203e -1     0xff3f -1     0xfe49 0xfe4a 
 
616
         0xfe4d 0xfe4e 0xfe4b 0xfe4c 0xfe5f 0xfe60 0xfe61 0xff0b 
 
617
         0xff0d 0x00d7 0x00f7 0x00b1 0x221a 0xff1c 0xff1e 0xff1d 
 
618
         0x2266 0x2267 0x2260 0x221e 0x2252 0x2261 0xfe62 0xfe63 
 
619
         0xfe64 0xfe66 0xfe65 0x223c 0x2229 0x222a 0x22a5 0x2220 
 
620
         0x221f 0x22bf 0x33d2 0x33d1 0x222b 0x222e 0x2235 0x2234 
 
621
         0x2640 0x2642 0x2641 0x2609 0x2191 0x2193 0x2192 0x2190 
 
622
         0x2196 0x2197 0x2199 0x2198 0x2016 0xff5c 0xff0f 0xff3c 
 
623
         0x2215 0xfe68 0xff04 0xffe5 0x3012 0xffe0 0xffe1 0xff05 
 
624
         0xff20 0x2103 0x2109 0xfe69 0xfe6a 0xfe6b 0x33d5 0x339c 
 
625
         0x339d 0x339e 0x33ce 0x33a1 0x338e 0x338f 0x33c4 0x00b0 
 
626
         0x5159 0x515b 0x515e 0x515d 0x5161 0x5163 )
 
627
     ; 0x12321 ... 0x1237e
 
628
     (block 2
 
629
         0x55e7 0x74e9 0x7cce 0x2581 0x2582 0x2583 0x2584 0x2585 
 
630
         0x2586 0x2587 0x2588 0x258f 0x258e 0x258d 0x258c 0x258b 
 
631
         0x258a 0x2589 0x253c 0x2534 0x252c 0x2524 0x251c 0x2594 
 
632
         0x2500 0x2502 0x2595 0x250c 0x2510 0x2514 0x2518 0x256d 
 
633
         0x256e 0x2570 0x256f 0x2550 0x255e 0x256a 0x2561 0x25e2 
 
634
         0x25e3 0x25e5 0x25e4 0x2571 0x2572 0x2573 -1     -1     
 
635
         -1     -1     -1     -1     -1     -1     -1     -1     
 
636
         -1     -1     -1     -1     -1     -1     -1     -1     
 
637
         -1     -1     -1     -1     -1     -1     -1     -1     
 
638
         -1     -1     -1     -1     -1     -1     -1     -1     
 
639
         -1     -1     -1     -1     -1     -1     -1     -1     
 
640
         -1     -1     -1     -1     -1     -1     )
 
641
 
 
642
     ... IT'S VERY LONG, SNIP, SNIP, SNIP ...
 
643
 
 
644
     ; 0xe6621 ... 0xe667e
 
645
     (block 3397
 
646
         0x7bd0 0x7c2f 0x7c32 0x7c42 0x7c4e 0x7c68 0x7ca9 0x7ced 
 
647
         0x7dd0 0x7e07 0x7dd3 0x7e64 0x7f40 -1     0x8041 0x8063 
 
648
         0x80bb 0x6711 0x6725 0x8248 0x8310 0x8362 0x8312 0x8421 
 
649
         0x841e 0x84e2 0x84de 0x84e1 0x8573 0x85d4 0x85f5 0x8637 
 
650
         0x8645 0x8672 0x874a 0x87a9 0x87a5 0x87f5 0x8834 0x8850 
 
651
         0x8887 0x8954 0x8984 0x8b03 0x8c52 0x8cd8 0x8d0c 0x8d18 
 
652
         0x8db0 0x8ebc 0x8ed5 0x8faa 0x909c -1     0x915c 0x922b 
 
653
         0x9221 0x9273 0x92f4 0x92f5 0x933f 0x9342 0x9386 0x93be 
 
654
         0x93bc 0x93bd 0x93f1 0x93f2 0x93ef 0x9422 0x9423 0x9424 
 
655
         0x9467 0x9466 0x9597 0x95ce 0x95e7 0x973b 0x974d 0x98e4 
 
656
         0x9942 0x9b1d 0x9b98 -1     0x9d49 0x6449 0x5e71 0x5e85 
 
657
         0x61d3 0x990e 0x8002 0x781e -1     -1     )
 
658
     ; 0xe6721 ... 0xe677e
 
659
     (block 3398
 
660
         0x5528 0x5572 0x55ba 0x55f0 0x55ee 0x56b8 0x56b9 0x56c4 
 
661
         0x8053 0x92b0 -1     -1     -1     -1     -1     -1     
 
662
         -1     -1     -1     -1     -1     -1     -1     -1     
 
663
         -1     -1     -1     -1     -1     -1     -1     -1     
 
664
         -1     -1     -1     -1     -1     -1     -1     -1     
 
665
         -1     -1     -1     -1     -1     -1     -1     -1     
 
666
         -1     -1     -1     -1     -1     -1     -1     -1     
 
667
         -1     -1     -1     -1     -1     -1     -1     -1     
 
668
         -1     -1     -1     -1     -1     -1     -1     -1     
 
669
         -1     -1     -1     -1     -1     -1     -1     -1     
 
670
         -1     -1     -1     -1     -1     -1     -1     -1     
 
671
         -1     -1     -1     -1     -1     -1     )
 
672
 
 
673
 
 
674
 
 
675
 
 
676
 
 
677
 
 
678
File: VFlib-36.info, Node: Utility programs, Next: Sample programs, Prev: Code conversion system, Up: Top
 
679
 
 
680
 
 
681
Utility programs
 
682
****************
 
683
 
 
684
* Menu:
 
685
 
 
686
* vflmkcaptex::
 
687
* vflpp::
 
688
* vflmkfdb::
 
689
* vfldrvs::
 
690
 
 
691
 
 
692
 
 
693
 
 
694
File: VFlib-36.info, Node: vflmkcaptex, Next: vflpp, Up: Utility programs
 
695
 
 
696
vflmkcaptex
 
697
===========
 
698
 
 
699
 
 
700
`vflmkcaptex' is a utility program to generate vflibcap file for TeX DVI
 
701
driver software automatically.  With simple command line arugments, a
 
702
vflibcap that uses PK, GF, Virtual Font, Type 1 fonts with complex TeX
 
703
font mapping rules.
 
704
 
 
705
Usage: vflmkcaptex [ OPTIONS... ] [ CLASS... ]
 
706
 
 
707
Usage: vflmkcaptex [ SHORTCUT ] [ OPTIONS... ]
 
708
 
 
709
`CLASS...' is a list of font class names to support by vflibcap file to
 
710
be generated.  `OPTIONS...' is option list to customize default
 
711
settings.  `SHORTCUT' is a shortcut name to typical options and class
 
712
name list.
 
713
 
 
714
Shortcut:
 
715
 
 
716
 
 
717
minimum
 
718
     This is the same as command line option pk.  Use PK fonts only.
 
719
 
 
720
simple
 
721
     This is the same as command line option -g pk tfm.  Use PK fonts.
 
722
     If PK font file is missing, it is generated on-the-fly.  If font
 
723
     cannot be created, black square is displayed instead of character
 
724
     glyph (as long as corresponding TFM file exists).
 
725
 
 
726
standard
 
727
     This is the same as command line option -t1 -g.  Use default class
 
728
     list type1 vf pk tfm.  Missing PK font is created on-the-fly.
 
729
 
 
730
simple-ja
 
731
     This is the same as command line option -g pk tfm -jtex -jisx0212
 
732
     -jpcf.  (Japanese support for simple shortcut.)
 
733
 
 
734
standard-ja
 
735
     This is the same as command line option -t1 -g -jtex -jisx0212
 
736
     -jpcf.  (Japanese support for standard shortcut.)
 
737
 
 
738
 
 
739
 
 
740
Font class list:
 
741
 
 
742
 
 
743
gf
 
744
     Enables to use GF font files.  For searching font files, kpathsea
 
745
     is used.  That is, font files are searched under TeX `texmf'
 
746
     directory (typically, `/usr/local/share/texmf').
 
747
 
 
748
pk
 
749
     Enables to use PK font files.  For searching font files, kpathsea
 
750
     is used.
 
751
 
 
752
vf
 
753
     Enables to use Virtual Font files.  For searching font files,
 
754
     kpathsea is used.
 
755
 
 
756
tfm
 
757
     Enables to use TFM files.  This option enables to display black
 
758
     square instead of glyph.  The size of square obeys font metric of
 
759
     each character.  This is useful when glyph file (e.g., PK, Type1)
 
760
     is missing.
 
761
 
 
762
type1
 
763
     Enables to use Type 1 fonts.  (Currently, it supports Roman
 
764
     fonts. CJK fonts are not supported.)  For searching font files,
 
765
     kpathsea is used.
 
766
 
 
767
     By this option, font definitions for PostScript fonts used in TeX
 
768
     DVI files are generated by reading `psfonts.map' of `dvips'.  Each
 
769
     PostScript font listed in `psfonts.map' is checked if it exists.
 
770
     (For PostScript fonts, this program automatically searchs Adobe
 
771
     Acrobat 3 and 4 font directories.)  If a PostScript font in
 
772
     question is not found, `Ghostscript' font definition file `Fontmap'
 
773
     is checked to substitute the font by a font in `Ghostscript' font
 
774
     directory.
 
775
 
 
776
     This feature is very useful for displaying and printing TeX DVI
 
777
     files with PostScript fonts.  So, I recommned obtain Adobe Acrobat
 
778
     3 and 4 for Type 1 PostScript fonts.  (Linux version are freely
 
779
     available.)
 
780
 
 
781
 
 
782
When a font is requested to open, the font is tried to open by font
 
783
classes by the order in the command line.
 
784
 
 
785
So, by a `vflibcap' generated by the following example, font in PK
 
786
format is rearched first.  If a font in PK format is not found, font in
 
787
Type 1 format is searched next.
 
788
     vflmkcaptex pk type1
 
789
 
 
790
Therefore, the order of font classes decides the priority of font file
 
791
formats to search.
 
792
 
 
793
 
 
794
Options:
 
795
 
 
796
 
 
797
--help
 
798
     Print a list of command line options and exit.
 
799
 
 
800
--version
 
801
     Print version number of this program and exit.
 
802
 
 
803
-p PROG
 
804
     Application program name. This is used by kpathsea for font file
 
805
     search. Default is xgdvi, which is a DVI previewer in the TeX-Guy
 
806
     package.
 
807
 
 
808
-n MODE
 
809
     Device mode name for font file search, used by kpathsea.  Default
 
810
     is cx
 
811
  
 
812
-r DPI
 
813
     Device resolution in DPI. Default is 300.
 
814
 
 
815
     If this option is not given, `vflmkcaptex' reads `mode.mf', which
 
816
     is a device mode definition file for METAFONT, and obtains revice
 
817
     resolution automatically.
 
818
 
 
819
-g
 
820
     Configure `vflibcap' to generate non-existing PK files on-the-fly.
 
821
 
 
822
-pk
 
823
     When `CLASS...' is not given, default font class set is assumed by
 
824
     default.  For such case, generate a `vflibcap' to search PK font
 
825
     file before searching Type 1 font by this option.
 
826
 
 
827
-t1
 
828
     When `CLASS...' is not given, generate a `vflibcap' to search Type
 
829
     1 font file before searching PK font file by this option.
 
830
 
 
831
 
 
832
Options for Japanese TeX support:
 
833
 
 
834
-jtex
 
835
     Generate font definitions for JIS X0208 character set used by
 
836
     Japanese TeX.  By default, a `vflibcap' to be generated uses
 
837
     Japanese Kanji character in PCF format (in X11 font directory).
 
838
     See also `-jpcf', `-jekanji' and `-jttf' options.
 
839
 
 
840
-jisx0212
 
841
     Generate font definitions for JIS X0208 character set used by
 
842
     Japanese TeX.  Note that generated font names are not standard.  It
 
843
     is used for private use of the author.
 
844
 
 
845
-jpcf
 
846
     Switch to use PCF fonts for Japanese Kanji characters.  (This is
 
847
     the default.)
 
848
 
 
849
-jekanji
 
850
     Switch to use eKanji fonts for Japanese Kanji characters.  See
 
851
     *Note eKanji font class:: for detail about eKanji fonts.
 
852
 
 
853
-jttf
 
854
     Switch to use TrueType fonts for Japanese Kanji characters.
 
855
 
 
856
-jpfd DIR
 
857
     Add a PCF font directory.  `vflmkcaptex' checks typical X11 PCF
 
858
     font directories and existing directories are added to PCF font
 
859
     directory list.  This option should be used when you want to add
 
860
     optional (and not automatically detected) PCF font directory.  This
 
861
     option can be used multiple times.
 
862
 
 
863
-jefd DIR
 
864
     Add a eKanji font directory.  This option can be used multiple
 
865
     times.
 
866
 
 
867
-jtfd DIR
 
868
     Add a TrueType font directory.  This option can be used multiple
 
869
     times.
 
870
 
 
871
 
 
872
-jtdb FILE
 
873
     By this option, an external definition database file FILE is read
 
874
     for generating definitions of non-standard TeX Japanese fonts using
 
875
     Japanese TrueType font files.  Each line in FILE is a pair of (1)
 
876
     font name used in TeX and (2) TrueType font file name.  Following
 
877
     is an example:
 
878
 
 
879
          dfailpaa dcail5.ttc
 
880
          dfainpaa dcai5.ttc
 
881
          dfaispaa dcais5.ttc
 
882
          dfbrrsaa dfbrr7.ttc
 
883
          dfbrrzaa dfbrrc.ttc
 
884
          dfbrspaa dfbrs5.ttc
 
885
          dfbrsvaa dfbrs9.ttc
 
886
          dfbrszaa dfbrsc.ttc
 
887
 
 
888
     See files in a directory `ascii-jtex/' for detail.
 
889
 
 
890
 
 
891
 
 
892
`vflmkcaptex' is a Unix Shell script.  It uses following programs to
 
893
generate a `vflibcap' file.  Descriptions the followng programs are
 
894
ommited since most of users never use them directly.  For details,
 
895
invoke each program with `--help' option to see how to use it.
 
896
 
 
897
`vflmkvfl'
 
898
       A generator for VFlib defaults.  (See *Note VFlib defaults::.)
 
899
`vflmktex'
 
900
       A generator for TeX mapping class.  (See *Note TeX default and
 
901
     TeX font mapping font class::.)
 
902
`vflmkpk'
 
903
       A generator for PK class.  (See *Note PK font class::.)
 
904
`vflmkgf'
 
905
       A generator for GF class.  (See *Note GF font class::.)
 
906
`vflmkvf'
 
907
       A generator for Virtual Font class.  (See *Note VF font class::.)
 
908
`vflmktfm'
 
909
       A generator for TFM class.  (See *Note TFM font class::.)
 
910
`vflmkt1'
 
911
       A generator for Type 1 class.  (See *Note Type1 font class::.)
 
912
`vflmkekan'
 
913
       A generator for eKanji class.  (See *Note eKanji font class::.)
 
914
`vflmkajt'
 
915
       A generator for ASCII Japanese TeX class.  (See *Note ASCII
 
916
     Japanese TeX Kanji font class::.)
 
917
 
 
918
 
 
919
 
 
920
 
 
921
 
 
922
 
 
923
File: VFlib-36.info, Node: vflpp, Next: vflmkfdb, Prev: vflmkcaptex, Up: Utility programs
 
924
 
 
925
vflpp
 
926
=====
 
927
 
 
928
`vflpp' prettyprints (i.e., grinds) a vflibcap file.  It eliminate all
 
929
comment strings and unnecessary space and newline characters.
 
930
 
 
931
Usage: vflpp [ VFLIBCAP-FILE ]
 
932
 
 
933
A program `vflpp' prettyprints a file VFLIBCAP to standard output.  If
 
934
no argument is given, `vflpp' reads from standard input.
 
935
 
 
936
 
 
937
 
 
938
 
 
939
 
 
940
File: VFlib-36.info, Node: vflmkfdb, Next: vfldrvs, Prev: vflpp, Up: Utility programs
 
941
 
 
942
vflmkfdb
 
943
========
 
944
 
 
945
 
 
946
Usage: vflmkfdb FONT-DIRECTORY [ ... ]
 
947
 
 
948
A program `vflmkfdb' makes a font file hint database (FDB for short) in
 
949
a font directories given in the command line argument.
 
950
 
 
951
It is used in a font file search module in VFlib.  In case there are
 
952
many font files in many directories, search a font file consumes much
 
953
time to traverse directory hierarchy.  FDB file contains pairs of file
 
954
name and path name to the file in a single file. By reading FDB file, a
 
955
font file can be found without traversing directories.
 
956
 
 
957
For each FONT-DIRECTORY, a FDB file named `VFlib.fdb' is created in the
 
958
directory.
 
959
 
 
960
 
 
961
 
 
962
 
 
963
File: VFlib-36.info, Node: vfldrvs, Prev: vflmkfdb, Up: Utility programs
 
964
 
 
965
vfldrvs
 
966
=======
 
967
 
 
968
 
 
969
Usage: vfldrvs
 
970
 
 
971
A program `vfldrvs' prints a list of pre-installed font drivers in
 
972
VFlib.
 
973
 
 
974
 
 
975
 
 
976
 
 
977
 
 
978
File: VFlib-36.info, Node: Sample programs, Next: Difference between VFlib version 3.6 and 2, Prev: Utility programs, Up: Top
 
979
 
 
980
Sample programs
 
981
***************
 
982
 
 
983
* Menu:
 
984
 
 
985
* vflserver::
 
986
* vfltest::
 
987
* vflx11::
 
988
* vfldisol::
 
989
* ctext2pgm::
 
990
 
 
991
 
 
992
 
 
993
File: VFlib-36.info, Node: vflserver, Next: vfltest, Up: Sample programs
 
994
 
 
995
vflserver
 
996
=========
 
997
 
 
998
`vflserver' is a font server that provides the functionality of VFlib
 
999
via network.
 
1000
 
 
1001
`vflserver' can be invokes from command line or via network.
 
1002
 
 
1003
 
 
1004
* Menu:
 
1005
 
 
1006
* Using vflserver from command line::
 
1007
* Using vflserver via network::
 
1008
* The protocol of vflserver::
 
1009
 
 
1010
 
 
1011
 
 
1012
File: VFlib-36.info, Node: Using vflserver from command line, Next: Using vflserver via network, Up: vflserver
 
1013
 
 
1014
Using vflserver from command line
 
1015
---------------------------------
 
1016
 
 
1017
Usage: vflserver [-v VFLIBCAP] [-s SHRINK] [CMD-FILE ...]
 
1018
 
 
1019
`vflserver' receives a command, executes it, and return a result.  This
 
1020
is repeated until connection is closed or quit command is executed.
 
1021
`vflserver' reads a sequence of command from standard input if CMD-FILE
 
1022
option is not given.
 
1023
 
 
1024
Options:
 
1025
 
 
1026
 
 
1027
-v VFLIBCAP
 
1028
     A file name of vflibcap to be used. If this option is not given,
 
1029
     default vflibcap file is used. (Possibly, default vflibcap is
 
1030
     `/usr/local/share/VFlib/3.6.12/vflibcap'.)
 
1031
  
 
1032
-s SHRINK
 
1033
     `vflserver' has a feature to print obtained bitmaps in ASCII-art
 
1034
     style for debugging purpose.  When this feature is enabled, bitmaps
 
1035
     are shrinked by this factor.  This is effective when obtained
 
1036
     bitmaps are huge.
 
1037
 
 
1038
CMD-FILE ...
 
1039
     A sequence of commands can be read from files.  Commands in files
 
1040
     CMD-FILE ... are executed in given order.  After executing all
 
1041
     files, `vflserver' reads a sequence of commands from standard
 
1042
     input.  Thus, quit command may be explicitly given in CMD-FILE.
 
1043
     This option is effective in the process of font driver development
 
1044
     to do the same commands many times.
 
1045
 
 
1046
 
 
1047
 
 
1048
 
 
1049
 
 
1050
File: VFlib-36.info, Node: Using vflserver via network, Next: The protocol of vflserver, Prev: Using vflserver from command line, Up: vflserver
 
1051
 
 
1052
Using vflserver via network
 
1053
---------------------------
 
1054
 
 
1055
Before using `vflserver' via network, it must be installed to be invoked
 
1056
by `inetd'.  You must be a root to do the following procedures.
 
1057
 
 
1058
First, edit `/etc/services':
 
1059
 
 
1060
   * Network service name: vflserver
 
1061
   * Well known port: 4681
 
1062
   * Protocol: tcp
 
1063
 
 
1064
Add the following line to `/etc/inetd.conf'.
 
1065
 
 
1066
     vflserver stream tcp nowait nobody /usr/local/bin/vflserver vflserver 
 
1067
 
 
1068
If you need to explicitly specify a vflibcap file to be used, you must
 
1069
give `-v' option as follows:
 
1070
 
 
1071
     vflserver stream tcp nowait nobady /usr/local/bin/vflserver vflserver -v /foo/vflibcap
 
1072
 
 
1073
To force inetd to re-read `inetd.conf', send a HUP signal to inetd.
 
1074
 
 
1075
We finished installing vflserver to use via network.  Now, use `telnet'
 
1076
to check if `vflserver' is correctly installed to network service.  The
 
1077
following an example interaction.
 
1078
 
 
1079
     % telnet localhost vflserver
 
1080
     Trying 127.0.0.1...
 
1081
     Connected to localhost.
 
1082
     Escape character is '^]'.
 
1083
     ; This is a font server VFLSERVER Version 2.0 Fri Mar 13 11:58:42 JST 1998
 
1084
       ...
 
1085
 
 
1086
     ; Type `HELP' for description of the protocol.
 
1087
 
 
1088
     (100 "vflserver ready.")
 
1089
 
 
1090
     open1 timR14.pcf
 
1091
     (100 0 "timR14.pcf")
 
1092
     debug bitmap on
 
1093
     (100 "Ascii-art bitmap on.")
 
1094
     bitmap1 0 0x67
 
1095
     (100 8 13 0 9 9 0
 
1096
      "3eccc4c4cc78407c7f83c1e27c"
 
1097
     "
 
1098
      89012345678901
 
1099
      +------------+
 
1100
     9|            |9
 
1101
     0| ..@@@@@.   |0
 
1102
     1| @@..@@..   |1
 
1103
     2| @@...@..   |2
 
1104
     3| @@...@..   |3
 
1105
     4| @@..@@..   |4
 
1106
     5| .@@@@...   |5
 
1107
     6| .@......   |6
 
1108
     7| .@@@@@..   |7
 
1109
     8| .@@@@@@@   |8
 
1110
     9| +.....@@ o |9
 
1111
     0| @@.....@   |0
 
1112
     1| @@@...@.   |1
 
1113
     2| .@@@@@..   |2
 
1114
     3|            |3
 
1115
      +------------+
 
1116
      89012345678901
 
1117
     ")
 
1118
     quit
 
1119
     (100 "Happy Hacking")
 
1120
     Connection closed by foreign host.
 
1121
 
 
1122
 
 
1123
 
 
1124
 
 
1125
File: VFlib-36.info, Node: The protocol of vflserver, Prev: Using vflserver via network, Up: vflserver
 
1126
 
 
1127
The protocol of vflserver
 
1128
-------------------------
 
1129
 
 
1130
 
 
1131
Introduction
 
1132
............
 
1133
The VFLSERVER Protocol is a communication protocol between a server
 
1134
which offers font service and a client which uses fonts.
 
1135
 
 
1136
The character set assumed by this protocol is ASCII character set. A
 
1137
line is a sequence of character terminated by a newline character and
 
1138
communication between a server and a client is line-oriented.
 
1139
     
 
1140
 
 
1141
 
 
1142
Reply Format of a Server
 
1143
........................
 
1144
 
 
1145
Each request to a server by a client takes a form of a line.  The
 
1146
following are examples of client's requests.
 
1147
 
 
1148
     OPEN1 timR24.pcf
 
1149
     DEBUG BITMAP ON
 
1150
     BITMAP1 1 33
 
1151
 
 
1152
A reply by a server to a client is an S-expression, (lisp-like
 
1153
notation).  The following are examples of server's response.
 
1154
 
 
1155
     (100 0 "timR14.pcf")
 
1156
     (100 "Ascii-art bitmap on.")
 
1157
     (100 8 13 0 9 9 0 "3eccc4c4cc78407c7f83c1e27c")
 
1158
 
 
1159
The first number of the response of each reply by a server are formed by
 
1160
decimal digits and these three digits indicates the status of an
 
1161
execution of client's request.  Thus, this three digits is a status
 
1162
code.
 
1163
 
 
1164
The first digit is one of `1', `2', ...., `5'.  If this digit is `1', it
 
1165
there is no error at all.  If it is `5', there are some errors to
 
1166
achieve a request.  According to the degree of fatalness, the digit is
 
1167
decided; It is `1' if no error is detected and is `5' if some fatal
 
1168
errors are detected and it is impossible to continue to execute a
 
1169
server.  If it is not `5', a client can receive some result.
 
1170
 
 
1171
 
 
1172
The Protocol
 
1173
............
 
1174
 
 
1175
The following defines commands and their arguments by a client, and
 
1176
corresponding responses by a server. Command name is case-insensitive,
 
1177
but arguments are case-sensitive.  In the description of command format,
 
1178
arguments enclosed by [ ] can be omitted, while arguments that are not
 
1179
enclosed by [ ] are essential arguments and cannot be omitted.
 
1180
 
 
1181
 
 
1182
 
 
1183
OPEN1 FONT_NAME [ POINT_SIZE [ MAG_X MAG_Y [ DPI_X DPI_Y ]]]
 
1184
     Open a font in mode 1 (high resolution device oriented mode).  This
 
1185
     corresponds to `VF_OpenFont1()' function.  If it succeeds opening
 
1186
     the font, a font identifier is returned.  After a font is opened,
 
1187
     any request for a font is specified by font identifier (not font
 
1188
     name).
 
1189
 
 
1190
     Response:
 
1191
     When the command is successful: ( STATUS FONTID MESSAGE )
 
1192
              FONTID is a font id represented by non-negative integer in
 
1193
          decimal.
 
1194
     When the command failed: ( STATUS MESSAGE )
 
1195
               STATUS indicates that an error occurred.
 
1196
 
 
1197
 
 
1198
OPEN2 FONT_NAME [ PIXEL_SIZE [ MAG_X MAG_Y ]]
 
1199
     Open a font in mode 2 (low resolution device oriented mode).  This
 
1200
     corresponds to `VF_OpenFont2()' function.  If it succeeds opening
 
1201
     the font, a font identifier is returned.  After a font is opened,
 
1202
     any request for a font is specified by font identifier (not font
 
1203
     name).
 
1204
 
 
1205
     Response: Response is the same as one for `OPEN1' command.
 
1206
 
 
1207
 
 
1208
CLOSE FONT_ID
 
1209
     Closed a font.
 
1210
 
 
1211
     Response: ( STATUS MESSAGE )
 
1212
 
 
1213
 
 
1214
BITMAP1 FONT_ID CODE_POINT [ MAG_X MAG_Y ]
 
1215
     Obtain a bitmap.  FONT_ID is a font id.  This command corresponds
 
1216
     to `VF_GetBitmap1()' function of VFlib.
 
1217
 
 
1218
     Response:
 
1219
     When the command is successful: ( STATUS WIDTH HEIGHT OFFX OFFY MVX MVY BITMAP )
 
1220
          WIDTH and HEIGHT is a size of bitmap in pixels.  BITMAP is
 
1221
          encoded as a sequence of hexadecimal number.  Eight pixels are
 
1222
          encoded to two hexadecimal number and the weight of the i-th
 
1223
          (0 <= i < 8) pixel from the leftmost pixel is 0x80 >> i.
 
1224
          BITMAP is a sequence of encoded of rasters; the first raster
 
1225
          begins from the upper left corner to upper right corner.
 
1226
          Then, it is followed by next raster (one pixel down from the
 
1227
          first raster). One raster is (width+7)/8 bytes, and BITMAP
 
1228
          contains an encoded bitmap of ((width+7)/8)*height bytes.
 
1229
          Thus, the length of BITMAP is 2*((width+7)/8)*height.
 
1230
     When the command failed: ( STATUS MESSAGE )
 
1231
               STATUS indicates that an error occurred.
 
1232
 
 
1233
 
 
1234
BITMAP2 FONT_ID CODE_POINT [ PIXEL_SIZE [ MAG_X MAG_Y ]]
 
1235
     Obtain a bitmap. This command corresponds to `VF_GetBitmap2()'
 
1236
     function.  Response is the same as `BITMAP1' command.
 
1237
 
 
1238
 
 
1239
METRIC1 FONT_ID CODE_POINT [ POINT_SIZE [ MAG_X MAG_Y ]]
 
1240
     Obtain a metric information of a font.  This command corresponds to
 
1241
     `VF_GetMetric1()' function.
 
1242
 
 
1243
     Response:
 
1244
     When the command is successful: ( STATUS WIDTH HEIGHT OFFX OFFY MVX MVY )
 
1245
          Each element of the response is the same as return values for
 
1246
          `BITMAP1' command except for their units are points.
 
1247
     When the command failed: ( STATUS MESSAGE )
 
1248
               STATUS indicates that an error occurred.
 
1249
 
 
1250
 
 
1251
METRIC2 FONT_ID CODE_POINT [ PIXEL_SIZE [ MAG_X MAG_Y ]]
 
1252
     Obtain a metric information of a font.  This command corresponds to
 
1253
     `VF_GetMetric2()' function.
 
1254
 
 
1255
     Response: Same as METRIC1 command except for units are points.
 
1256
 
 
1257
 
 
1258
FONTBBX1 FONT_ID [ MAG_X MAG_Y ]
 
1259
     Obtain font bounding information of a given font FONT_ID opened in
 
1260
     mode 1.  The argument MAG_X MAG_Y are magnification factor to be
 
1261
     scaled.  This command corresponds to `VF_GetFontBoundingBox1()'
 
1262
     function.
 
1263
 
 
1264
     Response:
 
1265
     When the command is successful: ( STATUS WIDTH HEIGHT XOFF YOFF )
 
1266
          WIDTH and HEIGHT are width and height of bounding box,
 
1267
          respectively.  XOFF and YOFF are the largest horizontal and
 
1268
          vertical displacement of lower left corner of bounding box
 
1269
          from reference points.  Note that these values does not
 
1270
          guarantee the minimality; they only guarantee that all
 
1271
          characters can be contained in a box described by them.  Units
 
1272
          of return values are point.
 
1273
 
 
1274
     When the command failed: ( STATUS MESSAGE )
 
1275
               STATUS indicates that an error occurred.
 
1276
 
 
1277
 
 
1278
FONTBBX2 FONT_ID [ MAG_X MAG_Y ]
 
1279
     Arguments and return values are the same except FONT_ID must be in
 
1280
     mode 2 and units of return values are pixel.
 
1281
 
 
1282
 
 
1283
PROPERTY FONT_ID PROPERTY_NAME
 
1284
     Obtain a property named PROPERTY_NAME of a font FONT_ID.
 
1285
     @noindent
 
1286
 
 
1287
     Response:
 
1288
     When the command is successful: ( STATUS VALUE )
 
1289
     When the command failed: ( STATUS MESSAGE )
 
1290
               STATUS indicates that an error occurred.
 
1291
 
 
1292
 
 
1293
MINIMIZE-BBX [ FLAG ]
 
1294
     Select a mode whether a bitmap sent from a server should be
 
1295
     minimized or not. If FLAG is `ON', bounding boxes of bitmaps sent
 
1296
     from a server is minimized not to contain white pixels as possible.
 
1297
     If FLAG is `OFF', bitmaps sent from a server is not guaranteed to
 
1298
     be minimized bounding boxes.  If FLAG is not given, current mode is
 
1299
     returned.  Initial mode is `OFF'.
 
1300
 
 
1301
     Response: The current mode is returned even if the operation fails
 
1302
     or succeeds.
 
1303
     When the command is successful: ( STATUS-CODE MODE )
 
1304
                MODE is one of `ON' or `OFF'.
 
1305
     When the command failed: ( STATUS-CODE MODE )
 
1306
                MODE is one of `ON' or `OFF'.
 
1307
 
 
1308
 
 
1309
QUIT
 
1310
     Finish interaction between a server and a client.  This operation
 
1311
     always succeeds.
 
1312
 
 
1313
     Response: ( STATUS MESSAGE )
 
1314
 
 
1315
 
 
1316
 
 
1317
 
 
1318
 
 
1319
 
 
1320
File: VFlib-36.info, Node: vfltest, Next: vflx11, Prev: vflserver, Up: Sample programs
 
1321
 
 
1322
vfltest
 
1323
=======
 
1324
 
 
1325
 
 
1326
`vfltest' displays glyph of a given font and characters by ASCII-art
 
1327
form on a character terminal.  It does not requires X Window System, but
 
1328
the font of the terminal must be a fixed-width font, since bitmaps are
 
1329
printed by ASCII-art form.
 
1330
 
 
1331
Usage: vfltest [ OPTIONS... ] FONT_NAME CHAR_LIST
 
1332
 
 
1333
Options:
 
1334
 
 
1335
-mode1
 
1336
     A font is opened in mode 1 (high resolution device oriented mode).
 
1337
 
 
1338
-mode2
 
1339
     A font is opened in mode 2 (low resolution device oriented mode).
 
1340
 
 
1341
-ol
 
1342
     Bitmaps are obtained by `VF_GetOutline()' and then
 
1343
     `VF_OutlineToBitmap()'.  This option is effective only when a font
 
1344
     is opened in mode 1.
 
1345
 
 
1346
-v VFLIBCAP
 
1347
     A file name of vflibcap to be used. If this option is not given,
 
1348
     default vflibcap file is used. (Possibly, default vflibcap is
 
1349
     `/usr/local/share/VFlib/3.6.12/vflibcap'.)
 
1350
  
 
1351
-p POINT or -p PIXEL
 
1352
     Specify point or pixel size of characters.  If this option is not
 
1353
     given, size of characters are original size of a font.
 
1354
 
 
1355
-d DPI
 
1356
     Give a device resolution in DPI.  This option is effective only
 
1357
     when a font is opened in mode 1.
 
1358
 
 
1359
-m MAG
 
1360
     Specify vertical and horizontal magnification factor.  If this
 
1361
     option is not given, magnification factor is 1.0.
 
1362
 
 
1363
-mx MAG_H
 
1364
     Specify horizontal magnification factor.  If this option is not
 
1365
     given, horizontal magnification factor is 1.0.
 
1366
 
 
1367
-my MAG_V
 
1368
     Specify vertical magnification factor.  If this option is not
 
1369
     given, vertical magnification factor is 1.0.
 
1370
 
 
1371
--help
 
1372
     Print command line arguments and key operations on a window.
 
1373
 
 
1374
 
 
1375
A list of character is a sequence of the following forms.
 
1376
 
 
1377
 
 
1378
CODE
 
1379
     A character is given by character code.  Decimal (e.g., `34') and
 
1380
     Hexa-decimal (e.g., `0x67') numbers can be used.
 
1381
 
 
1382
FROM - TO
 
1383
     This form specifies characters by a range of character code, from
 
1384
     FROM to TO (e.g., `0x20 - 0x7e').  Space characters are necessary
 
1385
     before and after minus sign (`-').
 
1386
 
 
1387
=CHARLIST
 
1388
     This form specifies characters by a list of 1-byte characters,
 
1389
     e.g., `=abcdefg'.
 
1390
 
 
1391
 
 
1392
 
 
1393
 
 
1394