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.
15
File: VFlib-36.info, Node: Example vflibcap 2, Next: Example vflibcap 3, Prev: Example vflibcap 1, Up: Writing a vflibcap
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'.
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.
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.)
33
Parameters of device resolution and magnification factor for the
34
function `VF_OpenFont1()' determines the font size and font metrics to
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
43
;; -----------------------------------------------------------------
45
;; -----------------------------------------------------------------
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"
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"))
67
;; -----------------------------------------------------------------
68
;; TeX-related Font Class Default and TeX Font Mapper
69
;; -----------------------------------------------------------------
71
(tfm-directories "TEXMF")
72
(tfm-filename-extensions ".tfm")
74
((ascii-jtex-kanji "%f.jtex") "min*" "goth*" "tmin*" "tgoth*")
75
((pk "%f.%dpk") (gf "%f.%dgf") *)
77
(resolution-accuracy 0.02)
78
(resolution-corrections
80
240 263 288 312 346 415 498 597)
82
300 329 360 432 518 622 746 896 1075 1290 240 270)
84
400 438 480 576 691 829 995 1194 1433 1720 320 360)
86
600 657 720 864 1037 1244 1493 1792 2150 2580 480 540))
89
;; -----------------------------------------------------------------
90
;; GF Font Class Default
91
;; -----------------------------------------------------------------
93
(font-directories "TEXMF"))
95
;; -----------------------------------------------------------------
96
;; PK Font Class Default
97
;; -----------------------------------------------------------------
99
(font-directories "TEXMF"))
101
;; -----------------------------------------------------------------
102
;; VF Font Class Default
103
;; -----------------------------------------------------------------
105
(font-directories "TEXMF")
107
((type1 "%f.pfb" point-size-from-tfm) *) )
108
(open-style "try") ;; "none", "try", or "require"
109
(glyph-style "fill")) ;; "fill", or "empty"
111
;; -----------------------------------------------------------------
112
;; TFM Font Class Default
113
;; -----------------------------------------------------------------
115
(glyph-style "fill"))
117
;; -----------------------------------------------------------------
118
;; ASCII-JTeX Kanji fonts
119
;; -----------------------------------------------------------------
120
(define-default ascii-jtex-kanji
121
(tfm-directories "TEXMF")
122
(implicit-font-mapping-suffix ".jtex"))
124
;; -----------------------------------------------------------------
125
;; Type1 Font Class Default
126
;; -----------------------------------------------------------------
127
(define-default type1
128
(font-directories "TEXMF")
129
(afm-directories "TEXMF")
133
;; -----------------------------------------------------------------
134
;; TrueType Font Class Default
135
;; -----------------------------------------------------------------
136
(define-default truetype
137
(font-directories "TEXMF")
138
(platform-id "microsoft")
141
;; -----------------------------------------------------------------
142
;; PCF Font Class Default
143
;; -----------------------------------------------------------------
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")
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"))
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"))
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
;; -----------------------------------------------------------------
209
File: VFlib-36.info, Node: Example vflibcap 3, Prev: Example vflibcap 2, Up: Writing a vflibcap
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
218
;; -----------------------------------------------------------------
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))
233
;; -----------------------------------------------------------------
234
;; TeX-related Font Class Default and TeX Font Mapper
235
;; -----------------------------------------------------------------
237
(tfm-directories "TEXMF"
238
"/usr/local/lib/jtex/fonts"
239
"/usr/local/lib/tex/fonts")
240
(tfm-filename-extensions ".tfm")
243
((tfm "%f.%dtfm") *))
244
(resolution-accuracy 0.02)
245
(resolution-corrections
247
240 263 288 312 346 415 498 597)
249
300 329 360 432 518 622 746 896 1075 1290 240 270)
251
400 438 480 576 691 829 995 1194 1433 1720 320 360)
253
600 657 720 864 1037 1244 1493 1792 2150 2580 480 540))
256
;; -----------------------------------------------------------------
257
;; PK Font Class Default
258
;; -----------------------------------------------------------------
260
(font-directories "TEXMF"))
262
;; -----------------------------------------------------------------
263
;; TFM Font Class Default
264
;; -----------------------------------------------------------------
266
(glyph-style "fill"))
268
;; -----------------------------------------------------------------
276
File: VFlib-36.info, Node: Debugging a vflibcap, Next: Code conversion system, Prev: Writing a vflibcap, Up: Top
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
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.
290
The following Unix environment variables are used to print debugging
293
`VFLIB_DEBUG_FONT_OPEN'
294
-- If this environment variable is defined, the processes of font
297
`VFLIB_DEBUG_FONT_SEARCH'
298
-- If this variable is defined, the processes of font opens are
301
`VFLIB_DEBUG_VFLIBCAP'
302
-- If this variable is defined, the process of reading of
303
vflibcap file is printed.
305
`VFLIB_DEBUG_PARAMETERS'
306
-- If this variable is defined, VFlib prints how parameters
307
(variables) in vflibcap file are substituted.
310
-- If this variable is defined, the process of reading CCV files
313
`VFLIB_DEBUG_CCV_MAPPING'
314
-- If this variable is defined, encoding conversions by CCV are
324
File: VFlib-36.info, Node: Code conversion system, Next: Utility programs, Prev: Debugging a vflibcap, Up: Top
326
Code conversion system
327
**********************
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.
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'
350
Each conversion rule has the following information.
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...
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
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".)
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.
378
For example, a CCV file iso8859-1_unicode.ccv has the following
379
charset/encoding names:
381
* EXTERNAL charset name: ISO8859-1
382
* EXTERNAL charset encoding: ISO
383
* INTERNAL charset name: UNICODE
384
* INTERNAL charset encoding: UNICODE
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.)
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
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.
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)
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()'.
413
The internal (hardcoded) CCV functions
414
======================================
415
VFlib has several hardcoded CCV functions. Followings CCV functions are
419
* from ISO-2022 (`ISO2022') to Shift JIS (`SJIS')
421
* from Shift JIS (`SJIS') to ISO 2022 (`ISO2022')
423
* from EUC (`EUC') to ISO 2022 (`ISO2022')
425
* from Row-Cell (`Row-Cell') to ISO 2022 (`ISO2022')
427
* from ISO-2022 (`ISO2022') to Row-Cell (`Row-Cell')
429
* from ISO-2022 (`ISO2022') to WanSung (`WanSung')
431
* from Row-Cell (`Row-Cell') to WanSung (`WanSung')
433
* from ISO-2022 (`ISO2022') to Sequential Numbering (`Sequential2-0'
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.
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.
451
All of these are implemented simple arithmetic and large conversion
452
tables are not necessary in memory.
456
The syntax of CCV files
457
=======================
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'.
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
473
TYPE must be one of the following:
483
`(block BLOCK CODE0 CODE1 ...)'
485
Let C be a code point of a character to be converted by this CCV file.
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.
492
C1MAX, C2MAX and NBLOCKS are used internally to determine the necessary
493
memory area to load the table.
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'
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.
510
Example of a CCV file 1
511
=======================
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'.
519
This file is a table indexed by code points of ISO 8859-1; contents of
520
table entries are Unicode code points.
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)
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.
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 )
572
Example of a CCV file 2
573
=======================
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'.
580
This file is an example of CCV files that have `random-arrays' for
581
`table-type' directive.
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.
599
; 0x12121 ... 0x1217e
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
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
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
642
... IT'S VERY LONG, SNIP, SNIP, SNIP ...
644
; 0xe6621 ... 0xe667e
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
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
678
File: VFlib-36.info, Node: Utility programs, Next: Sample programs, Prev: Code conversion system, Up: Top
694
File: VFlib-36.info, Node: vflmkcaptex, Next: vflpp, Up: Utility programs
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
705
Usage: vflmkcaptex [ OPTIONS... ] [ CLASS... ]
707
Usage: vflmkcaptex [ SHORTCUT ] [ OPTIONS... ]
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
718
This is the same as command line option pk. Use PK fonts only.
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).
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.
731
This is the same as command line option -g pk tfm -jtex -jisx0212
732
-jpcf. (Japanese support for simple shortcut.)
735
This is the same as command line option -t1 -g -jtex -jisx0212
736
-jpcf. (Japanese support for standard shortcut.)
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').
749
Enables to use PK font files. For searching font files, kpathsea
753
Enables to use Virtual Font files. For searching font files,
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)
763
Enables to use Type 1 fonts. (Currently, it supports Roman
764
fonts. CJK fonts are not supported.) For searching font files,
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
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
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.
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.
790
Therefore, the order of font classes decides the priority of font file
798
Print a list of command line options and exit.
801
Print version number of this program and exit.
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
809
Device mode name for font file search, used by kpathsea. Default
813
Device resolution in DPI. Default is 300.
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.
820
Configure `vflibcap' to generate non-existing PK files on-the-fly.
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.
828
When `CLASS...' is not given, generate a `vflibcap' to search Type
829
1 font file before searching PK font file by this option.
832
Options for Japanese TeX support:
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.
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.
846
Switch to use PCF fonts for Japanese Kanji characters. (This is
850
Switch to use eKanji fonts for Japanese Kanji characters. See
851
*Note eKanji font class:: for detail about eKanji fonts.
854
Switch to use TrueType fonts for Japanese Kanji characters.
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.
864
Add a eKanji font directory. This option can be used multiple
868
Add a TrueType font directory. This option can be used multiple
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
888
See files in a directory `ascii-jtex/' for detail.
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.
898
A generator for VFlib defaults. (See *Note VFlib defaults::.)
900
A generator for TeX mapping class. (See *Note TeX default and
901
TeX font mapping font class::.)
903
A generator for PK class. (See *Note PK font class::.)
905
A generator for GF class. (See *Note GF font class::.)
907
A generator for Virtual Font class. (See *Note VF font class::.)
909
A generator for TFM class. (See *Note TFM font class::.)
911
A generator for Type 1 class. (See *Note Type1 font class::.)
913
A generator for eKanji class. (See *Note eKanji font class::.)
915
A generator for ASCII Japanese TeX class. (See *Note ASCII
916
Japanese TeX Kanji font class::.)
923
File: VFlib-36.info, Node: vflpp, Next: vflmkfdb, Prev: vflmkcaptex, Up: Utility programs
928
`vflpp' prettyprints (i.e., grinds) a vflibcap file. It eliminate all
929
comment strings and unnecessary space and newline characters.
931
Usage: vflpp [ VFLIBCAP-FILE ]
933
A program `vflpp' prettyprints a file VFLIBCAP to standard output. If
934
no argument is given, `vflpp' reads from standard input.
940
File: VFlib-36.info, Node: vflmkfdb, Next: vfldrvs, Prev: vflpp, Up: Utility programs
946
Usage: vflmkfdb FONT-DIRECTORY [ ... ]
948
A program `vflmkfdb' makes a font file hint database (FDB for short) in
949
a font directories given in the command line argument.
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.
957
For each FONT-DIRECTORY, a FDB file named `VFlib.fdb' is created in the
963
File: VFlib-36.info, Node: vfldrvs, Prev: vflmkfdb, Up: Utility programs
971
A program `vfldrvs' prints a list of pre-installed font drivers in
978
File: VFlib-36.info, Node: Sample programs, Next: Difference between VFlib version 3.6 and 2, Prev: Utility programs, Up: Top
993
File: VFlib-36.info, Node: vflserver, Next: vfltest, Up: Sample programs
998
`vflserver' is a font server that provides the functionality of VFlib
1001
`vflserver' can be invokes from command line or via network.
1006
* Using vflserver from command line::
1007
* Using vflserver via network::
1008
* The protocol of vflserver::
1012
File: VFlib-36.info, Node: Using vflserver from command line, Next: Using vflserver via network, Up: vflserver
1014
Using vflserver from command line
1015
---------------------------------
1017
Usage: vflserver [-v VFLIBCAP] [-s SHRINK] [CMD-FILE ...]
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.
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'.)
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
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.
1050
File: VFlib-36.info, Node: Using vflserver via network, Next: The protocol of vflserver, Prev: Using vflserver from command line, Up: vflserver
1052
Using vflserver via network
1053
---------------------------
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.
1058
First, edit `/etc/services':
1060
* Network service name: vflserver
1061
* Well known port: 4681
1064
Add the following line to `/etc/inetd.conf'.
1066
vflserver stream tcp nowait nobody /usr/local/bin/vflserver vflserver
1068
If you need to explicitly specify a vflibcap file to be used, you must
1069
give `-v' option as follows:
1071
vflserver stream tcp nowait nobady /usr/local/bin/vflserver vflserver -v /foo/vflibcap
1073
To force inetd to re-read `inetd.conf', send a HUP signal to inetd.
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.
1079
% telnet localhost vflserver
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
1086
; Type `HELP' for description of the protocol.
1088
(100 "vflserver ready.")
1091
(100 0 "timR14.pcf")
1093
(100 "Ascii-art bitmap on.")
1096
"3eccc4c4cc78407c7f83c1e27c"
1119
(100 "Happy Hacking")
1120
Connection closed by foreign host.
1125
File: VFlib-36.info, Node: The protocol of vflserver, Prev: Using vflserver via network, Up: vflserver
1127
The protocol of vflserver
1128
-------------------------
1133
The VFLSERVER Protocol is a communication protocol between a server
1134
which offers font service and a client which uses fonts.
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.
1142
Reply Format of a Server
1143
........................
1145
Each request to a server by a client takes a form of a line. The
1146
following are examples of client's requests.
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.
1155
(100 0 "timR14.pcf")
1156
(100 "Ascii-art bitmap on.")
1157
(100 8 13 0 9 9 0 "3eccc4c4cc78407c7f83c1e27c")
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
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.
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.
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
1191
When the command is successful: ( STATUS FONTID MESSAGE )
1192
FONTID is a font id represented by non-negative integer in
1194
When the command failed: ( STATUS MESSAGE )
1195
STATUS indicates that an error occurred.
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
1205
Response: Response is the same as one for `OPEN1' command.
1211
Response: ( STATUS MESSAGE )
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.
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.
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.
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.
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.
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.
1255
Response: Same as METRIC1 command except for units are points.
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()'
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.
1274
When the command failed: ( STATUS MESSAGE )
1275
STATUS indicates that an error occurred.
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.
1283
PROPERTY FONT_ID PROPERTY_NAME
1284
Obtain a property named PROPERTY_NAME of a font FONT_ID.
1288
When the command is successful: ( STATUS VALUE )
1289
When the command failed: ( STATUS MESSAGE )
1290
STATUS indicates that an error occurred.
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'.
1301
Response: The current mode is returned even if the operation fails
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'.
1310
Finish interaction between a server and a client. This operation
1313
Response: ( STATUS MESSAGE )
1320
File: VFlib-36.info, Node: vfltest, Next: vflx11, Prev: vflserver, Up: Sample programs
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.
1331
Usage: vfltest [ OPTIONS... ] FONT_NAME CHAR_LIST
1336
A font is opened in mode 1 (high resolution device oriented mode).
1339
A font is opened in mode 2 (low resolution device oriented mode).
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.
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'.)
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.
1356
Give a device resolution in DPI. This option is effective only
1357
when a font is opened in mode 1.
1360
Specify vertical and horizontal magnification factor. If this
1361
option is not given, magnification factor is 1.0.
1364
Specify horizontal magnification factor. If this option is not
1365
given, horizontal magnification factor is 1.0.
1368
Specify vertical magnification factor. If this option is not
1369
given, vertical magnification factor is 1.0.
1372
Print command line arguments and key operations on a window.
1375
A list of character is a sequence of the following forms.
1379
A character is given by character code. Decimal (e.g., `34') and
1380
Hexa-decimal (e.g., `0x67') numbers can be used.
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 (`-').
1388
This form specifies characters by a list of 1-byte characters,