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

« back to all changes in this revision

Viewing changes to src/vflmkcaptex.in

  • 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
#!/bin/sh
 
2
 
 
3
# vflmkcaptex
 
4
# --- Generate vflibcap for TeX DVI drivers
 
5
#     (Especially, DVIware of the TeX-Guy Project)
 
6
#
 
7
# by Hirotsugu Kakugawa
 
8
 
9
# 13 May 2001
 
10
# 12 Oct 2001  Fixed bugs. Thanks to James Hirschorn.
 
11
#              Changed to read modex.mf to obtain device resolution. 
 
12
 
 
13
# Copyright (C) 2001  Hirotsugu Kakugawa. 
 
14
# All rights reserved.
 
15
#
 
16
# This program is free software; you can redistribute it and/or modify
 
17
# it under the terms of the GNU General Public License as published by
 
18
# the Free Software Foundation; either version 2, or (at your option)
 
19
# any later version.
 
20
 
21
# This program is distributed in the hope that it will be useful,
 
22
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
23
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
24
# GNU General Public License for more details.
 
25
 
26
# You should have received a copy of the GNU General Public License
 
27
# along with this program; if not, write to the Free Software
 
28
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
 
29
 
 
30
version="1.0"
 
31
 
 
32
vflibversion="@vflib_version@"
 
33
prefix=@prefix@
 
34
datadir=${prefix}/share
 
35
 
 
36
 
 
37
k_mode_d="cx"
 
38
k_dpi_d="300"
 
39
k_prg_d="xgdvi"
 
40
 
 
41
fclass_pk_def="pk vf type1 tfm"
 
42
fclass_t1_def="type1 vf pk tfm"
 
43
prefer_t1_="no"
 
44
 
 
45
emit_portable="no"
 
46
fclass=""
 
47
ccv=""
 
48
use_tex_mapper="no"
 
49
gen_pk_otf="no"
 
50
use_jtex="no"
 
51
use_jtex_jisx0212="no"
 
52
jtex_class="pcf"
 
53
pcf_kanji_dir_extra=""
 
54
ekanji_kanji_dir_extra=""
 
55
ttf_kanji_dir_extra=""
 
56
ttf_fontdef_opt=""
 
57
ajt_ttf_fontdb=""
 
58
 
 
59
k_mode=${k_mode_d}
 
60
k_dpi=-1
 
61
k_prg=${k_prg_d}
 
62
 
 
63
cmdline=$*
 
64
 
 
65
 
 
66
usage()
 
67
{
 
68
  echo "vflmkcaptex - make a vflibcap file of VFlib 3 for TeX DVI drivers." 
 
69
  echo "Usage: vflmkcaptex [Options] [Class-list]" 
 
70
  echo "    or vflmkcaptex [Shortcut] [Options]" 
 
71
  echo "Class-list:  pk, gf, vf, type1, tfm"
 
72
  echo "  A list of font class names."
 
73
  echo "  Default class list: pk vf type1 tfm (with -pk option)"
 
74
  echo "                      type1 vf pk tfm (with -t1 option)"
 
75
  echo "Options:" 
 
76
  echo "  -p PROG     Program name for kpathsea (default: ${k_prg_d})" 
 
77
  echo "  -n MODE     Device mode name for kpathsea (default: ${k_mode_d})" 
 
78
  echo "  -r DPI      Device resolution in DPI (default: ${k_dpi_d})" 
 
79
  echo "  -g          Enable to generate PK on-the-fly" 
 
80
  echo "  -pk         Search PK font before Type 1 (default)" 
 
81
  echo "  -t1         Search Type1 font before PK" 
 
82
  echo "  -i          Generate more portable font directory list" 
 
83
  echo "  --version   Print version number and exit" 
 
84
  echo "  --help      Print help message" 
 
85
  echo "Options for Japanese Kanji characters:" 
 
86
  echo "  -jtex       Enable Japanese Kanji (JISX0208) font support" 
 
87
  echo "  -jisx0212   Enable Japanese Hojo Kanji (JISX0212) font support" 
 
88
  echo "  -jpcf       Use X11 PCF fonts (default)" 
 
89
  echo "  -jttf       Use TrueType fonts" 
 
90
  echo "  -jekanji    Use eKanji fonts" 
 
91
  echo "  -jpfd DIR   Add PCF font directory" 
 
92
  echo "  -jtfd DIR   Add TrueType font directory" 
 
93
  echo "  -jefd DIR   Add eKanji font directory" 
 
94
  echo "  -jtdb FILE  File for TeX font definition with TrueType font"
 
95
  echo "        The format of a file for -jtdb option is a sequence of"
 
96
  echo "        lines, each of which contains TeX font name and TrueType"
 
97
  echo "        font file name."
 
98
  echo "Shortcut:"
 
99
  echo "  minimum       same as 'pk' (PK only)"
 
100
  echo "  simple        same as '-g pk tfm' (PK and TFM only)"
 
101
  echo "  standard      same as '-t1 -g' (use default class list)" 
 
102
  echo "  simple-ja     same as '-g pk tfm -jtex -jisx0212 -jpcf'"
 
103
  echo "  standard-ja   same as '-t1 -g -jtex -jisx0212 -jpcf'"
 
104
  exit 0;
 
105
}
 
106
 
 
107
 
 
108
# Check shortcut
 
109
shortcut=""
 
110
if [ $# -ge 1 ] 
 
111
then
 
112
  case $1 in
 
113
  minimum)
 
114
    shift
 
115
    shortcut="pk"
 
116
    ;;
 
117
  simple)
 
118
    shift
 
119
    shortcut="-g pk tfm"
 
120
    ;;
 
121
  simple-ja)
 
122
    shift
 
123
    shortcut="-g pk tfm -jtex -jisx0212 -jpcf"
 
124
    ;;
 
125
  standard)
 
126
    shift
 
127
    shortcut="-t1 -g"
 
128
    ;;
 
129
  standard-ja)
 
130
    shift
 
131
    shortcut="-t1 -g -jtex -jisx0212 -jpcf"
 
132
    ;;
 
133
  kakugawa)     # developer's preference B-)
 
134
    shift
 
135
    shortcut="-pk \
 
136
              -jtex -jisx0212 \
 
137
              -jttf \
 
138
              -jtfd /usr/local/share/fonts/DynaFont-TypeMuseum//  \
 
139
              -jtfd /usr/local/share/fonts/DynaFont-SpecialPack1//  \
 
140
              -jtfd /usr/local/share/fonts/DynaFont-Premium30//  \
 
141
              -jtfd /usr/local/share/fonts/FontCity2//  \
 
142
              -jtfd /usr/local/share/fonts/TrueTypeWorld-ValueFont141//  \
 
143
              -jtfd /usr/local/share/fonts/TrueTypeWorld-ValueFontDX//  \
 
144
              -jtdb ../ascii-jtex/fonts.lst"
 
145
    ;;
 
146
  esac
 
147
fi
 
148
args_rest=$*
 
149
 
 
150
set -- $shortcut $args_rest
 
151
 
 
152
#echo $# $*
 
153
#exit 1;
 
154
 
 
155
# Command line argument
 
156
fclass=""
 
157
while [ $# -gt 0 ] 
 
158
do
 
159
  case "$1" in
 
160
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 
161
  *) optarg= ;;
 
162
  esac
 
163
 
 
164
  case $1 in
 
165
  --prefix=*)
 
166
    prefix=$optarg
 
167
    datadir=${prefix}/share
 
168
    ;;
 
169
  --datadir=*)
 
170
    datadir=$optarg
 
171
    ;;
 
172
  pk|gf|tfm|vf|type1)
 
173
    fclass="${fclass} $1"
 
174
    ;;
 
175
  -r)
 
176
    k_dpi=$2
 
177
    shift
 
178
    ;;
 
179
  -n)
 
180
    k_mode=$2
 
181
    shift
 
182
    ;;
 
183
  -p)
 
184
    k_prg=$2
 
185
    shift
 
186
    ;;
 
187
  -i)
 
188
    emit_portable="yes"
 
189
    ;;
 
190
  -g)
 
191
    gen_pk_otf="yes"
 
192
    ;;
 
193
  -t1)
 
194
    prefer_t1="yes"
 
195
    ;;
 
196
  -pk)
 
197
    prefer_t1="no"
 
198
    ;;
 
199
  -jtex)
 
200
    use_jtex="yes"
 
201
    ;;
 
202
  -jisx0212)
 
203
    use_jtex="yes"
 
204
    use_jtex_jisx0212="yes"
 
205
    ;;
 
206
  -jpcf)
 
207
    use_jtex="yes"
 
208
    jtex_class="pcf"
 
209
    ;;
 
210
  -jekanji)
 
211
    use_jtex="yes"
 
212
    jtex_class="ekanji"
 
213
    ;;
 
214
  -jttf)
 
215
    use_jtex="yes"
 
216
    jtex_class="ttf"
 
217
    ;;
 
218
  -jtfd)
 
219
    ttf_kanji_dir_extra="${ttf_kanji_dir_extra} $2"
 
220
    shift
 
221
    ;;
 
222
  -jpfd)
 
223
    pcf_kanji_dir_extra="${pcf_kanji_dir_extra} $2"
 
224
    shift
 
225
    ;;
 
226
  -jefd)
 
227
    ekanji_kanji_dir_extra="${ekanji_kanji_dir_extra} $2"
 
228
    shift
 
229
    ;;
 
230
  -jtdb)
 
231
    ajt_ttf_fontdb="${ajt_ttf_fontdb} -tf $2"
 
232
    shift
 
233
    ;;
 
234
  --help|-help|-hel|-he|-h)
 
235
    usage;
 
236
    ;;
 
237
  --ver*|-ver*|-v)
 
238
    echo "${version}, VFlib ${vflibversion}"
 
239
    exit 1
 
240
    ;;
 
241
  *)
 
242
    echo "" >&2
 
243
    echo "vflmkcaptex: Unknown option ${1}" >&2
 
244
    echo "Use --help option for help" >&2
 
245
    echo "Abort" >&2
 
246
    exit 1
 
247
    ;;
 
248
  esac
 
249
  shift
 
250
done
 
251
 
 
252
if [ "x-${fclass}" = "x-" ] ; then
 
253
  if [ "x-${prefer_t1}" = "x-no" ]; then
 
254
    fclass=${fclass_pk_def}
 
255
  else
 
256
    fclass=${fclass_t1_def}
 
257
  fi
 
258
fi
 
259
 
 
260
for c in ${fclass}; 
 
261
do
 
262
  case $c in
 
263
  vf|type1)
 
264
    use_tex_mapper="yes"
 
265
  esac
 
266
done
 
267
 
 
268
if [ "${use_jtex}" = "yes" ] ; then
 
269
  ccv="${ccv} -c jisx0201_unicode.ccv "
 
270
  ccv="${ccv} -c jisx0208_unicode.ccv "
 
271
  ccv="${ccv} -c jisx0208sjis_unicode.ccv "
 
272
  ccv="${ccv} -c jisx0212_unicode.ccv "
 
273
fi
 
274
 
 
275
 
 
276
# Checking kpathsea
 
277
have_kpathsea=no
 
278
kpsewhich texmf.cnf >/dev/null 2>/dev/null
 
279
if [ $? = "0" ] ; then
 
280
  have_kpathsea=yes
 
281
fi
 
282
if [ "x-${have_kpathsea}" = "x-no" ] ; then
 
283
  echo "" >&2
 
284
  echo "No kpathsea."  >&2
 
285
  echo "Abort" >&2
 
286
  exit 1;
 
287
fi
 
288
 
 
289
 
 
290
# Subroutines 
 
291
 
 
292
type1_check_adobe()
 
293
{
 
294
  t1dir=" /usr/local/Acrobat3/Fonts \
 
295
          /usr/Acrobat3/Fonts \
 
296
          /opt/Acrobat3/Fonts \
 
297
          /usr/lpp/Acrobat3/Fonts \
 
298
          /usr/local/Acrobat4/Resource/Font \
 
299
          /opt/Acrobat4/Resource/Font \
 
300
          /usr/Acrobat4/Resource/Font \
 
301
          /usr/lpp/Acrobat4/Resource/Font "
 
302
  for f in ${t1dir}; do
 
303
    if [ "x-${emit_portable}" = "x-yes" ] ; then
 
304
      type1_opt="${type1_opt} -d ${f}"
 
305
    else
 
306
      ff=`echo ${f} | sed 's|//$||'`
 
307
      if [ -d ${ff} ] ; then
 
308
        type1_opt="${type1_opt} -d ${f}"
 
309
      fi
 
310
    fi
 
311
  done
 
312
}
 
313
 
 
314
type1_check_gs()
 
315
{
 
316
  gs_fm=""
 
317
  tmp=/tmp/vflmkcaptex$$
 
318
  rm -f ${tmp}
 
319
  echo '0 1 LIBPATH length 1 sub { 
 
320
        LIBPATH exch get print (\n) print } for' > ${tmp}
 
321
  d=`gs -q -DNODISPLAY ${tmp} quit.ps`
 
322
  if [ $? -eq 0 ] ; then
 
323
    for f in ${d}; do
 
324
      if [ -f ${f}/Fontmap ] ; then
 
325
        gs_fm="-gm ${f}/Fontmap"
 
326
      fi
 
327
      if [ "x-${f}" != "x-." ] ; then
 
328
        type1_gs_opt="${type1_gs_opt} -gf ${f}"
 
329
        type1_opt="${type1_opt} -a ${f}"
 
330
      fi
 
331
    done
 
332
  fi
 
333
  rm -f ${tmp}
 
334
  type1_gs_opt="${type1_gs_opt} ${gs_fm}"
 
335
}
 
336
 
 
337
type1_check_fontmap()
 
338
{
 
339
  dc=`kpsewhich '-format=dvips config' config.ps`
 
340
  if [ $? -ne 0 ] ; then
 
341
    echo "" >&2
 
342
    echo "dvips config file 'config.ps' not found" >&2
 
343
    echo "Abort" >&2
 
344
    exit 1;
 
345
  fi
 
346
  sed 's/[[:blank:]]//' > /dev/null < /dev/null 2> /dev/null; 
 
347
  if [ $? -eq 0 ]; then 
 
348
    sedfiltregex='s/^p[[:blank:]]*[+]*\([^[:blank:]]*\)[:blank:]*/\1/'
 
349
  else
 
350
    sedfiltregex='s/^p[         ]*[+]*\(.*map\).*/\1/'
 
351
  fi
 
352
  maps=`cat $dc| sed 's/%.*//' | grep '^p' | sed "$sedfiltregex"`
 
353
  #echo $maps; exit
 
354
  for m in $maps; 
 
355
  do
 
356
    f=`kpsewhich '-format=dvips config' $m`
 
357
    if [ $? -eq 0 ] ; then
 
358
      type1_fontmap="${type1_fontmap} $m"
 
359
    else
 
360
      echo "" >&2
 
361
      echo "dvips fontmap file $m is not found" >&2
 
362
      echo "Abort" >&2
 
363
      exit 1;
 
364
    fi
 
365
  done
 
366
}
 
367
 
 
368
pcf_check_dir()
 
369
{
 
370
  pcfdirs=" /usr/X11R6/lib/X11/fonts// \
 
371
            /usr/local/X11R6/lib/X11/fonts// \
 
372
            /usr/openwin/lib/X11/fonts// \
 
373
            /usr/X386/lib/X11/fonts// \
 
374
            /usr/XFree86/lib/X11/fonts// \
 
375
            /usr/X11/lib/X11/fonts// \
 
376
            /usr/local/lib/X11/fonts// \
 
377
            /usr/X11R5/lib/X11/fonts// \
 
378
            /usr/local/X11R5/lib/X11/fonts// \
 
379
            /usr/local/share/emacs/fonts// \
 
380
            /usr/local/share/fonts/X11// "
 
381
  pcf_dir_opt=""
 
382
  for f in ${pcfdirs} ${pcf_kanji_dir_extra}; do
 
383
    if [ "x-${emit_portable}" = "x-yes" ] ; then
 
384
      pcf_dir_opt="${pcf_dir_opt} -d ${f}"
 
385
    else
 
386
      ff=`echo ${f} | sed 's|//$||'`
 
387
      if [ -d ${ff} ] ; then
 
388
        pcf_dir_opt="${pcf_dir_opt} -d ${f}"
 
389
      fi
 
390
    fi
 
391
  done
 
392
}
 
393
 
 
394
ekanji_check_dir()
 
395
{
 
396
  ekanjidirs=" /usr/local/share/fonts/ekanji// \
 
397
             /usr/local/share/fonts/eKanji// "
 
398
  ekanji_dir_opt=""
 
399
  for f in ${ekanjidirs} ${ekanji_kanji_dir_extra}; do
 
400
    if [ "x-${emit_portable}" = "x-yes" ] ; then
 
401
      ekanji_dir_opt="${ekanji_dir_opt} -d ${f}"
 
402
    else
 
403
      ff=`echo ${f} | sed 's|//$||'`
 
404
      if [ -d ${ff} ] ; then
 
405
        ekanji_dir_opt="${ekanji_dir_opt} -d ${f}"
 
406
      fi
 
407
    fi
 
408
  done
 
409
}
 
410
 
 
411
ttf_check_dir()
 
412
{
 
413
  ttfdirs=" "
 
414
  ttf_dir_opt=""
 
415
  for f in ${ttfdirs} ${ttf_kanji_dir_extra}; do
 
416
    if [ "x-${emit_portable}" = "x-yes" ] ; then
 
417
      ttf_dir_opt="${ttf_dir_opt} -d ${f}"
 
418
    else
 
419
      ff=`echo ${f} | sed 's|//$||'`
 
420
      if [ -d ${ff} ] ; then
 
421
        ttf_dir_opt="${ttf_dir_opt} -d ${f}"
 
422
      fi
 
423
    fi
 
424
  done
 
425
}
 
426
 
 
427
get_device_resolution()
 
428
{
 
429
  modes_mf=`kpsewhich modes.mf`
 
430
  if [ x-${modes_mf} = x- ] ; then
 
431
    echo "Not found: modes.mf" >&2
 
432
    exit;
 
433
  fi
 
434
  if [ ! -f ${modes_mf} ] ; then
 
435
    echo "Not found: modes.mf" >&2
 
436
    exit;
 
437
  fi
 
438
  devdpi=`cat ${modes_mf} | awk -v devname=${k_mode} '
 
439
    BEGIN {
 
440
      devdpi = "";
 
441
    } 
 
442
    END {
 
443
      if (devdpi == ""){
 
444
        printf("-1\n");  # not found
 
445
      }
 
446
      printf("%s\n", devdpi);
 
447
    } 
 
448
    # Line: e.g.,  mode_def ljfour =              % 600dpi HP LaserJet 4
 
449
    /^mode_def/ { 
 
450
      mode=$2; 
 
451
      ppi=-1; 
 
452
      ppiv=-1; 
 
453
      asp=1.0;
 
454
      i=index($0, "%");
 
455
      x=substr($0, i);
 
456
      desc=substr($0, i + match(x, "[a-zA-Z0-9]") - 1);
 
457
    }
 
458
    # Line: e.g.,     mode_param (pixels_per_inch, 600);
 
459
    /^[ \t]*mode_param[ \t]*\([ \t]*pixels_per_inch, [ \t]*[0-9.]+\);/ {
 
460
      match($3, "[0-9.]*");
 
461
      ppi=substr($3, 1, RLENGTH);
 
462
      ppiv=-1; 
 
463
    }
 
464
    # Line: e.g.,     mode_param (aspect_ratio, 4/3);
 
465
    # Currently, aspect ratio must be 1
 
466
    /^[ \t]*mode_param[ \t]*\([ \t]*aspect_ratio[ \t]*,[ \t]*[0-9./]+[ \t]*);/ {
 
467
      i=match($0, ",[ \t]*");
 
468
      s0=i+RLENGTH;
 
469
      x=substr($0, s0);
 
470
      len=match(x, ")");
 
471
      asp=substr($0, s0, len-1);
 
472
      ppiv=asp*ppi;
 
473
      ppi=-1; ### ignore this entry.
 
474
    }
 
475
    # Line: e.g.,   mode_param (aspect_ratio, 180 / pixels_per_inch);
 
476
    /^[ \t]*mode_param[ \t]*\([ \t]*aspect_ratio, [ \t]*.*\/[ \t]*pixels_per_inch)/ {
 
477
      i=match($0, ",[ \t]*[0-9.]");
 
478
      x=substr($0, i+RLENGTH-1);
 
479
      s0=i+RLENGTH-1;
 
480
      match(x, "[ \t]*/");
 
481
      ppiv=substr($0, s0, RSTART-1);
 
482
      asp=ppi/ppiv;
 
483
      ppi=-1; ### ignore this entry.
 
484
    }
 
485
    # Line: e.g., enddef;
 
486
    /^enddef/ {
 
487
      if ((mode != "") && (ppi > 0)){
 
488
        if ((ppiv < 0) && (mode == devname)){
 
489
          devdpi=ppi;
 
490
        }
 
491
        mode=""; 
 
492
        ppi=-1; 
 
493
        ppiv=-1; 
 
494
        desc="";
 
495
      }
 
496
    } '`
 
497
  if [ ${devdpi} -eq -1 ] ; then 
 
498
    k_dpi=${k_dpi_d};
 
499
  else
 
500
    k_dpi=${devdpi}
 
501
  fi
 
502
}
 
503
 
 
504
 
 
505
# end of subroutines
 
506
 
 
507
 
 
508
 
 
509
# Emit vflibcap
 
510
 
 
511
xd=`date`
 
512
xh=`hostname`
 
513
xu=`who am i | awk '{ print $1 }'`
 
514
echo ";; a vflibcap file generated by 'vflmkcaptex' automatically"
 
515
echo ";; at ${xd} "
 
516
echo ";; on ${xh} by ${xu}"
 
517
echo ";; "
 
518
echo ";; command line arguments given to generate this vflibcap:"
 
519
echo ";;   vflmkcaptex ${cmdline}"
 
520
echo ";; "
 
521
echo ""
 
522
 
 
523
if [ ${k_dpi} -eq -1 ] ; then
 
524
  get_device_resolution;
 
525
fi
 
526
# echo ${k_mode} ${k_dpi}; exit;
 
527
 
 
528
# Emit VFlib default
 
529
opt="-n ${k_mode} -r ${k_dpi} -p ${k_prg}"
 
530
if [ "x-${have_kpathsea}" = "x-yes" ] ; then
 
531
  opt="${opt} -k"
 
532
fi
 
533
if [ "x-${use_tex_mapper}" = "x-yes" ] ; then
 
534
  opt="${opt} -i TeX"
 
535
else
 
536
  for c in ${fclass}; do
 
537
    case ${c} in
 
538
    pk|gf|tfm)
 
539
      opt="${opt} -i ${c}"
 
540
      ;;
 
541
    esac
 
542
  done
 
543
fi
 
544
vflmkvfl ${opt} ${ccv}
 
545
 
 
546
 
 
547
# Emit TeX font mapper
 
548
opt=""
 
549
opt_map=""
 
550
if [ "x-${use_tex_mapper}" = "x-yes" ] ; then
 
551
  opt_map=""
 
552
  for c in ${fclass}; do
 
553
    case ${c} in
 
554
    pk)
 
555
      opt_map="${opt_map} -m ${c} %f.%dpk"
 
556
      ;;
 
557
    gf)
 
558
      opt_map="${opt_map} -m ${c} %f.%dgk"
 
559
      ;;
 
560
    vf)
 
561
      opt_map="${opt_map} -m ${c} %f.vf"
 
562
      ;;
 
563
    tfm)
 
564
      opt_map="${opt_map} -m ${c} %f.%dtfm"
 
565
      ;;
 
566
    type1)
 
567
      opt_map="${opt_map} -m ${c} %f.pfb"
 
568
      ;;
 
569
    ascii-jtex-kanji)
 
570
      opt_map="${opt_map} -m ${c} %f.jtex"
 
571
      ;;
 
572
    esac 
 
573
  done
 
574
  opt="-r \$TeX_DPI"
 
575
  opt="${opt} -d TEXMF"
 
576
  vflmktex ${opt} ${opt_map}
 
577
fi
 
578
 
 
579
# Emit each class
 
580
 
 
581
comopt1="-n \$TeX_KPATHSEA_MODE -d TEXMF"
 
582
comopt2="-r \$TeX_DPI"
 
583
for c in ${fclass}; do
 
584
  opt=""
 
585
  case ${c} in
 
586
  pk)
 
587
    if [ "x-${gen_pk_otf}" = "x-yes" ] ; then
 
588
      opt="-g"
 
589
    fi
 
590
    vflmkpk  ${comopt1} ${comopt2} ${opt}
 
591
    ;;
 
592
  gf)
 
593
    vflmkgf  ${comopt1} ${comopt2}
 
594
    ;;
 
595
  vf)
 
596
    vflmkvf  ${comopt1} ${comopt2} -m any %f.pk
 
597
    ;;
 
598
  type1)
 
599
    opt="${comopt1} ${comopt2}"
 
600
    opt="${opt} -x .pk"
 
601
    opt="${opt} -a TEXMF"
 
602
    opt="${opt} -e ${datadir}/VFlib/${vflibversion}/t1lib"
 
603
    opt="${opt} -e ${datadir}/VFlib/site"
 
604
    opt="${opt} -e ${datadir}/VFlib/site/t1lib"
 
605
    opt="${opt} -f -t"
 
606
    type1_opt=""
 
607
    type1_gs_opt=""
 
608
    type1_fontmap=""
 
609
    type1_check_adobe
 
610
    type1_check_gs
 
611
    type1_check_fontmap
 
612
    opt="${opt} ${type1_opt} ${type1_gs_opt} ${type1_fontmap}"
 
613
    vflmkt1  ${opt}
 
614
    ;;
 
615
  tfm)
 
616
    vflmktfm ${comopt1} ${comopt2}
 
617
    ;;
 
618
  esac 
 
619
done
 
620
 
 
621
opt="-r \$TeX_DPI"
 
622
if [ "${use_jtex}" = "yes" ] ; then
 
623
  jtex_opt="-c ${jtex_class}"
 
624
  if [ "x-${use_jtex_jisx0212}" = "x-yes" ] ; then
 
625
    jtex_opt="${jtex_opt} -jisx0212"
 
626
  fi
 
627
  case ${jtex_class} in
 
628
  pcf)
 
629
    pcf_check_dir
 
630
    vflmkpcf ${opt} ${pcf_dir_opt}
 
631
    ;;
 
632
  ekanji)
 
633
    ekanji_check_dir
 
634
    vflmkekan ${ekanji_dir_opt}
 
635
    ;;
 
636
  ttf)
 
637
    ttf_check_dir
 
638
    vflmkttf ${opt} -d TEXMF ${ttf_opt} ${ttf_dir_opt}
 
639
    jtex_opt="${jtex_opt} ${ajt_ttf_fontdb}"
 
640
    ;;
 
641
  esac
 
642
  vflmkajt -d TEXMF -x .pk ${jtex_opt} 
 
643
fi
 
644
 
 
645
 
 
646
echo ""
 
647
echo ";; end."
 
648
 
 
649
# end